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

  • SEARCH
  • Home
  • 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 9250125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:22:23+00:00 2026-06-18T10:22:23+00:00

I’m working in AS3, Flash AIR 3.2 for iOS SDK. I’m trying to run

  • 0

I’m working in AS3, Flash AIR 3.2 for iOS SDK. I’m trying to run part of the program only after myLoader finishes loading an image. I have a myTimer.start(); which runs inside myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderComplete);.

What seems to be the problem at the moment is that the program is ignoring the 1000ms. The program is running after myLoader is finished at the moment, but it just seems to be doing its own thing in terms of the delay.

EDIT: Being more precise here… The program seems to be ignoring the Timer delay. Even if Timer is set to 100000ms. It seems to be running the rest of the program right after the image is loaded.

EDIT: I still had my methods running inside my Main() as well as the timerListener() in the code. Thought I commented them out. Whoops!

var myTimer:Timer = new Timer(1000);

public function Main()
    {
        init();
        displayImage();

        myTimer.addEventListener(TimerEvent.TIMER, timerListener);
        myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timerDone);

    }

public function displayImage():void {

        myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderComplete);

        myLoader.load(fileRequest);
    }

public function onLoaderComplete(e:Event) {
        //start Timer event here
        myTimer.start();
    }

public function timerListener (e:TimerEvent):void{
        trace("Timer is Triggered");
        myTimer.stop();

        aMethod();
        anotherMethod();
        moreMethods();
    }
  • 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-06-18T10:22:25+00:00Added an answer on June 18, 2026 at 10:22 am

    You don’t really clarify what you mean by “the timer is doing its own thing.” Is the timer shorter or longer than you expect?

    What I think is likely going on here is that your timer tick and your frame rate are out of synch. If you’re familiar with the concept of the elastic racetrack, you know that the single-threaded nature of Flash (unless you’re using worker threads) means that the screen can’t update during a script and vice-versa. This means that if your Timer fires while the Display list is updating, it just has to wait until the display list finishes and may even have to wait until other scripts have run, depending on how Flash is prioritizing the different things in its queue.

    From the Timer API:

    Depending on the SWF file’s framerate or the runtime environment
    (available memory and other factors), the runtime may dispatch events
    at slightly offset intervals. For example, if a SWF file is set to
    play at 10 frames per second (fps), which is 100 millisecond
    intervals, but your timer is set to fire an event at 80 milliseconds,
    the event will be dispatched close to the 100 millisecond interval.
    Memory-intensive scripts may also offset the events.

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

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group

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.