Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Whats the Action Script code (Using AS2) when you loop a scene once and then played again and stopin

New Here ,
Mar 20, 2013 Mar 20, 2013

Whats the Action Script code (Using AS2) when you loop a scene once and then played again and stoping on a certain frame?

TOPICS
ActionScript
588
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 20, 2013 Mar 20, 2013

You basically need to keep a count and use that as your stopping control.  In the first frame you need something to assign the value, but you don't want to reassign it a starting value, so you could use....

var count;

if(count == undefined){
    count = 0;
} else {
    count++;
}

Then, in the frame where you want to stop after one loop is completed you could have...

if(count == 1){

    stop();

}

Translate
LEGEND ,
Mar 20, 2013 Mar 20, 2013
LATEST

You basically need to keep a count and use that as your stopping control.  In the first frame you need something to assign the value, but you don't want to reassign it a starting value, so you could use....

var count;

if(count == undefined){
    count = 0;
} else {
    count++;
}

Then, in the frame where you want to stop after one loop is completed you could have...

if(count == 1){

    stop();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines