all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

BASIC question....


BASIC question.... littleangelo
5/31/2005 10:54:43 PM
flash actionscript:
I am very new to Actionscript. Bear with me...

How can I go to a different scene in a flash movie by pushing an interactive
button. My buttons don't work even with actionscripting applied to them. I
would like the button when pressed to go to a scene called "movies".
Additionally my button doesn't animate anymore when pressed.

Please help!

LittleAngelo
Re: BASIC question.... Jeckyl
6/1/2005 12:00:00 AM
[quoted text, click to view]

That is utter rubbish .. as least make sure you type in something that is
somewhat like correct code before you try to 'help' someone.

Jeckyl

Re: BASIC question.... CanonBoy
6/1/2005 12:49:09 AM
Well, there are a few ways. The easiest would probably be something like this.

Make your button, we'll call it myButton_btn. That's the name of the actual
movie clip in your library. Drag that button from the library onto the stage in
Scene 1. In the lower left box of the Property Inspector where it says
"instance name" enter a name, let's just say you call it buttonOne.

Now, on a new layer called Actions, click on the first frame.
In the Actions panel enter this:
[as]
_root.buttonOne.onRelease = function() {
gotoAndPlay(nextScene());
}
Stop();
[/as]

That's one way.
Re: BASIC question.... kglad
6/1/2005 12:50:53 AM
don't use scene info to navigate. label your frames and use those labels to
navigate.

for example, if you label frame 1 in the "movies" scene with "s2_f1", you can
use:

_root.gotoAndPlay("s2_f1");

p.s. if your button doesn't animate it may be because it's a child of a
movieclip that's intercepting mouse events or because of some other author
error.
AddThis Social Bookmark Button