flash q
- Started
- Last post
- 5 Responses
- Spix
I have a MC that i use as a button and as I click on it I want it to play another MC that is in the same frame. How do i make the second MC to not play until i click on the first mc?
thanks.
- fate_redux0
lol. Stop action on the first frame for the "MC to not play until..."
- Spix0
haha...well, i did that, but then how do i activate it?
sorry for such dumbass question, but i'm learning.
- fate_redux0
That's ok. I will kick my Pride-full ego in the balls for just a second.
_root.firstMC.onRelease=function... _root.secondMC.play() }
if you are at all uncertain, firstMC and secondMC are names given in the "instance name" field of the properties panel for each respective MovieClip.
- Spix0
thanks man....now probalby an even worst question... when i put this on a mc should it not go from frame 1 to frame 2? i dont get it to work.
on (release) {
gotoAndPlay(2)
}
- fate_redux0
no. First off, when you select a graphic and press F8, and you make it a Standard MovieClip (never a button) you do not use that kind of code.
Second off, it's better not to stick code onto MovieClips. Rather, with my method, you stick the code I gave you on the first frame of your movie. it keeps things much cleaner and neater.
If you really want to slap some code on a MovieClip, it's like this:
onClipEvent(load){
this.onRelease=function(){
//doSomething
}
}Using MC's over old Buttons have numerous performance advantages.