Home > OS >  How can I stop execution of remainder of code on a frame? AS3
How can I stop execution of remainder of code on a frame? AS3

Time:09-17

Using the goto command does not stop the current execution

for example if I have

gotoAndStop(2);
trace("1");

The application will still perform trace command and then move to frame 2. I would like to know if there is any such command that immediately ceases the execution of any code left in the frame?

CodePudding user response:

You can use the

return;

instruction to break the execution of the frame script.

  • Related