Koden
Koden

Reputation: 353

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

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?

Upvotes: 1

Views: 72

Answers (1)

Organis
Organis

Reputation: 7316

You can use the

return;

instruction to break the execution of the frame script.

Upvotes: 3

Related Questions