This content has been marked as final. Show 2 replies
The default actionscript version for CS3 is actionscript 3. You can no longer apply actions directly to objects in AS3. If you want to use the code as is, go to the publish settings for this movie and change the AS version to AS 1 & 2.
Or you can learn the new way, since you are using an ancient way of scripting. Give your buttons an instance name. Do this by clicking the symbol on stage, looking down in the properties inspector and seeing, <instance name>. Click there and type in a unique name, that will be your reference to that symbol for applying actions. For this example, I will use, my_btn, as the instance name. Create a new layer and label it "Actions", lock the layer. Click on the frame of that layer and open the actions panel. Note that is should say, "Actions-Frame", in the top left corner of the actions panel. Paste this in there.
So, he is an explanation..
just means we are adding a listener for the symbol with the instance name of my_btn, the listener is listening for all RollOver events triggered by the mouse on the button symbol. Every time it is rolled over, it will call the function, btnOver.
Is declaring the function btnOver, for which the listener will be triggering. it is an event, and happens to be a mouse event.
Here we are telling the symbol with instance name, my_mc, to goto and play frame 10. Since tellTarget is ancient, and I don't believe is available in AS3 anyway, we target symbols that are on stage using an instance name.