Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Button inside a Movie Clip


gavilan
4/26/2004 10:17:46 PM
Hello,
Can somebody help me please?

I have this button inside a Movie Clip and I want to click it a take me to Scene 2 of the same flash movie.

Thanks,
lumeeguvnor
4/26/2004 11:23:14 PM
movieClip.button.onRelease = function() {
gotoAndPlay(frame nos. );
}
movieClip needs an instance name as does the button.
gavilan
4/27/2004 4:24:00 PM
gryllsie
4/27/2004 4:28:50 PM
on (release) {
_root.gotoAndPlay("scene2", 1);
}

gavilan
4/27/2004 4:36:50 PM
Thanks, but it's not working...

I could get to change frame but not scene:

on (release) {
with (_level0) {
gotoAndStop(5);
}
}

So I used:

on (release) {
with (_level0) {
gotoAndStop("Scene 2", 5);
}
}

But it didn't work...


lumeeguvnor
4/27/2004 10:19:59 PM
as a point of interest all the reading i've done suggest its much better to use frames rather than scenes
but
try using gotoAndPlay instead of gotAndStop
gryllsie
4/28/2004 8:16:57 AM
It all sounds a bit weird. Basically '_root' targets level0 (or the base level
of the flash movie), therefore by saying _root.gotoAndPlay("scene2", 1) you are
asking the main flash movie to go to a scene called 'scene2', and play that
scene from frame 1. Do have an example online somewhere, of this not working?

Matt
AddThis Social Bookmark Button