Friday, March 18, 2016

Lab 25 Action Script 3.0

     In this lab, we use Flash CS6 to create a short animation with action scripts. With action script, we can add different commands to do certain actions to our animations. Since this is the first time we are working with action script 3.0, we are only creating something very simple. We need to create 2 buttons that will each show a different animations. Sounds easy, but not so much. We are having the two animations in the same layer, one placed at the first frame, the other at the last, which is the 10th frame. Then we need to have two buttons with action script that when you press it, it will take you to those either the first or the 10th frame to switch the animation.

      To create this, you first have to create three layers, one for the content, one for the two buttons, and one for the action script. First, create the two buttons with an name in the properties. Then add the two animations, one at frame 1, the other at frame 10. I used the car symbols from my lab 23. So one is the front and one the the back of the car, and since it's a bit dull, I made a extra layer of my background, and made the cars rotate. Then on the action layer. we open the action window to type our script in. We have learned that the action scripts are in a order of object.method(argument), but we have not yet learn exactly how to write the code we are using, so all we had to do is to copy it from the handout given by the teacher and change the object name to whatever we named it.

http://techteach.us/DD2015/HJiahua/Labs/Lab25/LB25_Jiahua_DD.html

No comments:

Post a Comment