[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

frame break;

Posted on 2006-04-08
2
Medium Priority
?
202 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:Donelson
2 Comments
 
LVL 16

Accepted Solution

by:
sam85281 earned 750 total points
ID: 16409001
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
 

Author Comment

by:Donelson
ID: 16409255
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question