frame break;

Is there a way to go to a new frame and NOT FINISH the ActionScript on the current frame

for example:

a = 1;
b = 2;
if (quit_request) {
  gotoAndPlay(2);
  break from this frame;
  }

c = 3;
d = 4;
....... etc etc


I want the playhead to go IMMEDIATELY to frame 2, WITHOUT completing the rest of the script shown...

Thanks
DonelsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sam85281Commented:
You wold have to put what you don't want executed in an else statement.

i.e.

a = 1;
b = 2;
if (quit_request) {
gotoAndPlay(2);
} else {
c = 3;
d = 4;
....... etc etc
}

-Sam
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DonelsonAuthor Commented:
I was afraid of that...

Oh well.

Thanks.


Or, I could put everything into a function...

if (quit_request) gotoAndPlay(2);
else frame5();

frame5 function () {
blah...
}

If I want the (quit_request) on every frame, the second way might be cleaner...

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.