Flex Timer not accurate

Source: Internet
Author: User
Tags event listener

1. The Timer class is the interface of the Flash player timer. You can create a new Timer object to run the code in a specified sequence of time. Use the start () method to start the timer. Adds an event listener to the timer event to set the code to run at the timer interval.
2. You can create a Timer object to run one time or repeat at a specified interval to execute code as planned. Depending on the frame frequency of the SWF file or the environment of the Flash Player (available memory and other factors), Flash Player can schedule events at a slightly skewed interval. For example, if a SWF file is set to play at a speed of 10 frames per second (that is, a 100 millisecond interval), but the timer is set to trigger events in 80 milliseconds, Flash player will trigger the event at intervals close to 100 milliseconds. Memory-intensive scripts can also cause events to deviate.
3.
4. Event.enter_frame triggers the event according to the frame frequency of the current SWF and runs the function that the event points to. Scheduling when the playhead enters a new frame. If the playhead does not move, or if there is only one frame, the event will continue to be dispatched with frame frequency. This event is scheduled for all display objects that listen to this event.
5. The effect of its execution interval is only the frame rate, that is, if you do not change the SWF frame frequency, you cannot change the execution interval (theoretically). But in the actual use of the same as the timer also have deviations, such as the animation is too complex or computer configuration caused by the animation "card" then the execution interval will also "card."

Workaround:

Js

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.