The Actions Wizard allows you to add interactivity to your animation in a visual way without even knowing any code.
Here we have this simple project where we have this asset here which is a movie clip symbol instance.
If we look within here, we have an Actions layer and we also have an animation sequence.
Let's click on that Actions layer and choose Window, Actions to open the Actions panel.
Here we can see this.stop() ; So, what this will do is actually stop anything from happening when the play head hits frame 1 of the internal symbol Timeline.
Going back up to Scene 1.
Let's go ahead and provide an instance name to this guy here.
I'll just call him guy, and then expanding my Actions panel, I can choose to Add code using wizard.
So, let's switch to that.
What I want to do is once somebody clicks on that instance, I want it to play.
So, here is a Play command.
That's my action, I'll choose that.
And then I have to choose the object to apply the action to.
I can choose the current Timeline, or I can choose guy.
Now if you remember, guy is the instance name I gave for that instance on the stage.
So, I'm going to choose guy and hit Next.
Now, I can choose how I want to initiate the action by choosing a triggering event.
In this case, I'm going to choose On Mouse Click.
And then the object for the triggering event.
Once again, guy.
I'll now Finish and add, and it applies the code with some comments to my Actions panel on Frame 1.
So, let's collapse this and give it a test.
I'm going to choose Control, Test.
So, my project has opened up in the web browser because this is an HTML5 Canvas project, and if I click on this instance, then it triggers the animation.
Perfect.
