Stop if the tween is not completed.

Source: Internet
Author: User

Today, we found that the flex component made by flash development tools contains the Tween transition.
CodeAs follows:

Function ABC ()
{
If (...)
{
...

VaR mytween: tween = new tween (mcobj, "width", strong. easeout, coursebarcrtlength. Width, 34 + 500 * crtp/totalp, 4, true );
Mcobj. width = 34 + 500 * crtp/totalp;
}
}

It is normal to run the flash control separately.

However, when Flex is used to call the above method ABC. Flex has performed a lot of Operations consecutively, saving data and changing the viewstack index.
At this time, we found that the Tween did not respond at all (because the Tween was not completed or was not moved at all)

 

 

Cause: In the flash code. Tween references local variables and is recycled by the garbage collection mechanism.

Solution: Pull local variables out of the code block.

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.