I have a movie clip that has buttons that are rotating in a circle. When you roll over a button the clip stops and it highlights the button. What I want to have is when you roll over it, a description pops up above the entire movie clip. This would be another movie clip. So is there a way to have a movie clip tell another movie clip to go to a specific frame in itself. thanks
sure. give your pop-up movieclip an instance name, say popupMC. then, if the movieclip containing your buttons has instance name menuMC and your buttons have instance names btn1,btn2 etc, you can use: for(i=1;i<butNum;i++){ menuMC["btn"+i].ivar=i; menuMC["btn"+i].onRollOver=function(){ popupMC._visible=1; popupMC.gotoAndStop(this.ivar); } menuMC["btn"+i].onRollOut=function(){ popupMC._visible=0; }
so how would I tell it to go to a specific frame or is that already in the code? i can only do fairly basic stuff w/ actionscripting
You can tell any movieclip to go to a sepcific frame, for example myMovie.gotoandPlay(25); this will tell that movieclip to goto and play frame 25 you clould do this after your myMovie._visible = true; Does that work, im confused on what you are looking to do
Originally posted by: kglad the code i gave has btni direct popup to frame i. I am confused about what btni is. is that just the variable button and how do i specify about which frame to go to in the script
i gave an example of coding that has btn1 direct popupMC to stop on frame 1 and btn2 directs popupMC to frame 2 and btn3 directs popupMC to frame 3 etc. you can edit the code to suit your particular needs.
so i applied the code to the first frame in my "actions" layer and the only thing that i can get it to do is to go to the first frame and when you roll off of it the popupMC disappears. the only button that does that is btn1 and the other btns don't do anything
so far, in your movie, you have 5 buttons. so, you should use butNum=6; if you added more buttons you would increase the value of this variable so that for-loop will define an onPress handler for each of your buttons: btn1, btn2,...
Don't see what you're looking for? Try a search.
|