Note that there are some explanatory texts on larger screens.

plurals
  1. POflex auto update script showing error
    primarykey
    data
    text
    <p>I want to enable auto update script in flex3. i am using below code to do this but flex editor showing red mark on line 39 and editor show error when i hover my mouse on red mark is:</p> <p>1046: Type was not found or was not a compile-time constant: UpdateEvent.</p> <p>how can i remove this error. please guide me.</p> <p> <pre><code> // Instantiate the updater private var appUpdater:ApplicationUpdaterUI = new ApplicationUpdaterUI(); private function checkForUpdate():void { // The code below is a hack to work around a bug in the framework so that CMD-Q still works on MacOS // This is a temporary fix until the framework is updated // See http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&amp;catid=670&amp;threadid=1373568 NativeApplication.nativeApplication.addEventListener( Event.EXITING, function(e:Event):void { var opened:Array = NativeApplication.nativeApplication.openedWindows; for (var i:int = 0; i &lt; opened.length; i ++) { opened[i].close(); } }); setApplicationVersion(); // Find the current version so we can show it below // Configuration stuff - see update framework docs for more details appUpdater.updateURL = "http://www.mytoplinks.net/flex/update.xml"; // Server-side XML file describing update appUpdater.isCheckForUpdateVisible = false; // We won't ask permission to check for an update appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate); // Once initialized, run onUpdate appUpdater.addEventListener(ErrorEvent.ERROR, onError); // If something goes wrong, run onError appUpdater.initialize(); // Initialize the update framework } private function onError(event:ErrorEvent):void { Alert.show(event.toString()); } private function onUpdate(event:UpdateEvent):void { appUpdater.checkNow(); //Go check for an update now } // Find the current version for our Label below private function setApplicationVersion():void { var appXML:XML = NativeApplication.nativeApplication.applicationDescriptor; var ns:Namespace = appXML.namespace(); ver.text = "Current version is " + appXML.ns::version; } ]]&gt; &lt;/mx:Script&gt; &lt;mx:VBox backgroundColor="blue" x="0" y="0" width="100%" height="100%"&gt; &lt;mx:Label color="white" id="ver" /&gt; &lt;/mx:VBox&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload