View Full Version : Button inside a movie clip...HELP!!!
haznut
11-01-2004, 06:16 PM
First of all, thanx for reading this.
i have a button inside a movieclip (so i can use on rollover and rollout to create a fade in/out effect) I know there are other ways to do this, but this one is the easiest for me.
the problem is, since the button is inside the movieclip, i canīt make it work on the main movie (goto scene.....goto frame). I used _root but obviously it takes me to the first scene, and not the one i want.
how can you make the button inside a movieclip load or goto scenes of the main movie???
thanx a lot for your time :)
funnygiggler
11-02-2004, 09:34 AM
http://www.actionscript.org/forums/showthread.php3?t=37381
try that link... i think it has something on it that may be of help to you... you may have to scroll down a bit more
haznut
11-03-2004, 04:23 PM
Hello thanx a lot for your reply.
I checked that link you mentioned, but didnīt find a solution to my problem.
hereīs the script i use:
on (rollOver) {
gotoAndPlay(2);
}
on (release){
_root.gotoAndPlay(1);
}
the rollover plays frames 2 to 15 making the fade in......
then comes my problem....if the button is inside the movieclip, it seems that you have to tell the button how to go to the other scenes. As you can see, i used _root to try if it works...and it does, but allways takes me to the main scene....the first one
What i need is to know how to go, for example, to a scene called "options" and what code to use instead of _root....or if thereīs another way to do this.
Thanx again for your time. :)
Gibberish
11-03-2004, 04:47 PM
by 'scenes' do you mean actual Flash 'scene's, 'frames' or 'labels'.
If you mean actual flash 'scenes' then you aren't coding right. It would be something like:
on (release){
_root.gotoAndPlay('myScene', 1);
}
you will need to use 'hitTest' ... do a search on hitTest. i answered one just like this yesterday.
haznut
11-03-2004, 05:57 PM
Gibberish.....that code doesnīt work either :(....itīs strange cause it should....
Tg....i did the search and checked out the codes....what i donīt understand is the function of "hitTest". What does that command do?
thanx a lot guys.
mouseMovie and mouseDown is triggered everytime the mouse is moved or the mouse is clicked.... so hitTest checks to see if the mouse is actually over the object you want to event to occur on. if it is, the code you want to run is executed, if not, the code is ignored.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.