-
Button nested inside MC
First of all, sorry to ask this question again, for it's bound to have been answered several times, but unfortunetly the Search function gave me a DBase error... :(
Anyhow... I have a Movieclip and inside is an invisible button. I want the movie to jump to frame 30 on the main timeline (or to "Enter" which is the framelabel at frame 30)
So I attached this code to my invisible button.
Code:
on (release){
_root.gotoAndPlay(30);
}
however, this doesn't seem to work, when clicked, the movie jumps to where the button was introduced to the timeline (frame 13 instead of frame 30)
Thx in advance
-
try using the frame label instead of frame number, its fairly simple, should work like a charm, if the problem presist, upload the file on this thread so some one can check..or email it to me [email protected]
-
you dont want to use _root.
you want to use _parent. instead so on(release) the button in your MC will gotoAndPlay("enter") on the main timeline.
the code for the button should look like this:
Code:
on(release){
_parent.gotoAndPlay(30);
}
if that doesnt work tell me
-
_parent did the trick, thx :) I always thought _root and _parent were the same?
try using the frame label instead of frame number, its fairly simple, should work like a charm, if the problem presist, upload the file on this thread so some one can check.. => I had already done that
Thx for helping me out peepz
-
just so you know:
_root is used to affect a MC from your main timeline
_parent is used to affect the main timeline from a MC
Note: Thats just generally there are other uses also.