Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 357257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:11:19+00:00 2026-05-12T12:11:19+00:00

I want to enable auto update script in flex3. i am using below code

  • 0

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:

1046: Type was not found or was not a compile-time constant: UpdateEvent.

how can i remove this error. please guide me.

    // 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&catid=670&threadid=1373568
        NativeApplication.nativeApplication.addEventListener( Event.EXITING, 
            function(e:Event):void {
                var opened:Array = NativeApplication.nativeApplication.openedWindows;
                for (var i:int = 0; i < 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;
    }
]]>
</mx:Script>

<mx:VBox backgroundColor="blue" x="0" y="0" width="100%" height="100%">
    <mx:Label color="white" id="ver" />
</mx:VBox>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:11:19+00:00Added an answer on May 12, 2026 at 12:11 pm

    add an import to UpdateEvent to the top of the script section

    import air.update.events.UpdateEvent;
    

    hth

    Koen

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 227k
  • Answers 228k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You set the time in the date to 00:00:00 before… May 13, 2026 at 1:29 am
  • Editorial Team
    Editorial Team added an answer When I set the title/subject of this question and reached… May 13, 2026 at 1:29 am
  • Editorial Team
    Editorial Team added an answer You are doing a LEFT OUTER JOIN on Products. Remeber… May 13, 2026 at 1:29 am

Related Questions

I have run into an issue with WPF and Commands that are bound to
In the SQL Server Full-Text Indexing scheme i want to know if a table
This is a common question, but the explanations found so far and observed behaviour
I am trying to add simple syntax highlighting and auto completion for a simple

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.