using mouse to call a sprite action
I’m having a mental block–
I’m trying to get a sprite to run on a mouse click, and I think I must have the actionscript messed up-
First I have a movieclip called ‘Character’. The first frame is the character standing, frame 2 is the character standing but I’ve turned it into a nother movieclip called ‘Char2’
‘Char2’ is a walking animation.
I want to click a button on the stage and have the character walk. The button has the instance name ‘b1’.
I have the ‘Character’ movieclip on the stage with the instance name ‘bled’
I’ve attached this action script to the basket instance b1:
on (release) {
bled.gotoAndPlay(2);
but all that does is make it play the ‘Character’ movie clip- noe of the walking animation.
I also tried
on (release) {
bled_this.Char2.gotoAndPlay(1);
which did nothing.
I’m not concerned about it moving across the screen right now, I just want to see the walking cycle play when I click the button.
Any help or suggestions?
Thanks