Ok this is probably obvious and real dumb but…I can’t seem to target a MC from my main timeline. I wanna tell my movieclip to start playing from frame 2 when an on (release) event handler is invoked from the main timeline. This is what I got but its not working. Help anyone?
[AS]
on (release) {
this.maskedimaged.gotoAndPlay(2);
}
[/AS]
*Originally posted by kax *
**It’s not like that, thor. :-\
Whenever you use this in the Button actions, it refers to the MovieClip that contains the Button. Confusing? Yeah, I know. **
gr…that darned “this” has been bugging me all week. i’ve had so many referencing problems with that 4-letter word.
First of all, make sure your movieclips have instance names. Those are the names AS uses to know which movieclip you are talking about, and thus are used in the AS. For the first code to work, your movieclip should have the instance name “maskedimage”. You can assign an instance name to a movieclip when clicking on it. Then, in the Properties panel on the left, there’s a box that says “<instance name>” in light-grey. There, you should fill in the instance name you want to give the movieclip.
Also, the first code will only work when maskedimage is on the main timeline. If it is stacked inside another movieclip which is on the main timeline, with the instance name “container” for example, then it should look like this:
no i didn’t change it. it should be “maskedimage”. What I wrote there was incorrect. Someone else told me that if you take another type of symbol and convert it into a movie clip, it won’t work. Sooo, that may be it but looks like we’ll never know. Thanks for all your helps peeps!