# Using mouse to call a sprite action

**URL:** <https://forum.kirupa.com/t/using-mouse-to-call-a-sprite-action/176075>\
**Category:** Uncategorized\
**Created:** [January 20, 2006, 2:46am UTC](https://forum.kirupa.com/t/using-mouse-to-call-a-sprite-action/176075 "2006-01-20T02:46:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skellykitten](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skellykitten](https://forum.kirupa.com/u/skellykitten)\
**Post date:** [January 20, 2006, 2:46am UTC](https://forum.kirupa.com/t/using-mouse-to-call-a-sprite-action/176075/1 "2006-01-20T02:46:53Z")

</div>

**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
