Flash Exercise Notes 1
syllabus | schedule | assignments | class notes | web resources | ARTC courses
Maya to SWF - External ActionScript files
Steps to Create an Interactive Flash Animation using Maya

1. Set Project - use Defaults and set the images to the local drive
2. Make animation
3. Save animation
4. Render Globals
5. Render Using: Maya Vector
6. File Name Prefix - name it
4. Frame/Animation ext - name.#.ext
7. Image Format - Macromedia SWF
8. Set start and End Frame
9. Deselect Alpha Channel (Mask)
10. Image Size - make this the same as your Flash file

Go to the Maya Vector tab
1. Frame Rate - 12
2. You will need to experiment with the following:

      Curve Tolerance
      Detail level
      Fill Style
      Edge Options

3. Close the window
4. Save
5. Arrange the camera in the perspective window
6. Switch to Rendering Module
7. Render Menu - Batch Render

Find the new SWF in your images folder in the Maya Project you set
1. Go into Flash and Import the new SWF onto the stage
2. Make a new layer for labels
3. Add a keyframe if needed and add a Frame name for the start of each section of the animation
4. Make a new layer for your actions
5. On the first frame of your Actions layer write this code:

      #include "myEX1_script.as"

6. Go to the File menu and New... ActionScript file (this is where you will keep your code.
7. Save as myEX1_script.as in the same directory where you save the Flash file
8. You can switch between your code and the Flash file with the tabs on the top left of the window
9. Select the first frame's graphics and convert to Button Symbol (name it) - you can add rollover states later
10. Select the Symbol and in the Properties give it an Instance Name (you use this name when referring to it in code)
11. In the external script file type:

      buttonName.onRelease = function(){

*buttonName is the name of your button and start1 is the name of the first frame of the animated section

Adding more structure
1. Add the following code to the end of each section of the animation (in the Actions layer)

      #include "myEX1_script.as"

2. Select the graphics at the end of each animated section and Convert to Button Symbol
3. Name each Instance Names of these new buttons (you have to select the button on the stage)
4. Go back to your ActionScript external file and add a new function for each button added. (copy and paste the old code and change the button name and label name)
5. Save the file
6. Test movie