Copy link to clipboard
Copied
Whats the Action Script code (Using AS2) when you loop a scene once and then played again and stoping on a certain frame?
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();
}
Copy link to clipboard
Copied
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();
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now