gotoAndStop, gotoAndPlay () does not work in FLASH CC. CANVAS

Source: Internet
Author: User

Don't say a few words first look at my code:

On the stage is SP0, SP1 、... sp8,9 MC, each MC has a few frames,

The following code is on the frame

var s=this; S.stop () inIt1 (); // Not working!  //setTimeout (init1,0);//use SetTimeout and it is working, why? function inIt1 () {    for (var i = 0; I <9; i++)    {        var _frame =math.floor (Math.random () * s["sp" + I].totalframes)        console.log (_frame)        s["sp" + I]. gotoAndStop (_frame)    }}

found that gotoAndStop (XX) is invalid, even if the use of gotoAndStop ("label name") is not valid, odd strange

Workaround: Then I try to use settimeout to execute incredibly effective, in time I have the delay time set to 0 is also valid.

Why this is still unclear, has been posted to the group Adobe Forum. Look forward to their reply

gotoAndStop, gotoAndPlay () does not work in FLASH CC. CANVAS

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.