Week 7: 3D Transformations, Audio Part 1

Topics:

  • Working in 3D
    • 3D Rotation Tool
    • 3D Translation Tool
    • Global vs. Local Transforms
    • 3D in the Properties Panel
    • 3D in Transform Panel
    • 3D Tweens
  • Audio Part 1: Timeline Audio

Working in 3D

So far weā€™ve been restricting ourselves to the X and Y axes in our Flash animations, but the time has come to venture into the Z! Today we are going to look at the 3D tools, and 3D Motion Tweens. First there are a couple of things you should know about 3D in Flash:

  • The native 3D in flash is really what we like to call ā€œ2 1/2 Dā€ because while you can move and rotate object on three axes, the object themselves are still two-dimensional. To get truly 3D object in Flash you will need the help of third party code libraries.
  • 3D transforms only work if your publish settings are set to Actionscript 3.0 and Flash Player 10.
  • 3D transforms increase file size and processing requirements, so only use them when you need them!
  • You can only perform 3D transformations on MovieClips and TLF Text!

3D Rotation Tool

This is the ā€œtopā€ tool in the 3D tools panel. The three axes of rotation are represented by Red (X), Green (Y), and Blue (Z) circles which you can grab and drag independently with your mouse. Click and drag outside of those circles, within the orange bounding circle, and you can rotate organically in all three dimensions.

3D Translation Tool

This is under the 3D rotation tool. This allows you to move your object in 3D space. The three axes are represented by Red (X), Green (Y), and Blue (Z) arrows, and you can move in that dimension by clicking and dragging on the associated arrow. You can only move in one direction at a time

Global vs Local Transforms

By default, the X,Y,Z axes and coordinates are represented relative, or local, to the object, but if you want to see them relative to the global stage coordinates, you can toggle the Global Transform Button at the bottom of the Tools palette or hit ā€˜Dā€™.

3D in the Properties Panel

If you want more precise control over your 3D positioning, you can manipulate it in the Properties panel for the selected object. You can also change the Perspective Angle and Vanishing Point here, which will affect how your object appears to move forward and back in the Z axis.

3D in Transform Panel

If you want more precise control over your 3D rotation, you can manipulate it in the Transform panel (not the free Transform tool). You can also change the 3D center point, which is where the object will rotate from.

3D Tweens

You can only apply Motion Tweens to objects with 3D properties ā€“ Classic Tweens wonā€™t work. When you apply a Motion Tween to an object with 3D properties set, the 3D Tween option in the contextual menu will automatically be checked. 3D tweens work the same as regular motion tweens, just with the addition of the 3D position and view propertiesĀ ā€” all tweenable!

There is additional information about 3D transforms in Flash here:

Exploring the new 3D features in Flash CS4 Professional

Using Audio Part 1: Timeline Audio

There are a number of different ways you can play audio through Flash, each has itā€™s advantages and disadvantages.

Supported Audio types

Many audio types are supported in Flash, but youā€™ll have best luck with .aiff or .mp3 files. All audio is published out of Flash in the mp3 format, so this is a good format to start with.

Import to Library

You add audio to your Flash movie the same way you import other media assets. You can use either ā€œImport to Libraryā€ or ā€œImport to Stageā€ but either way the audio file will end up in your library, but not on the stage.

Select an imported audio file in the library, and you will see a visual representation of the sound file, in addition to tiny little play and stop buttons to the top and right that allow you to preview the audio file.

To see additional properties of the sound file, double-click the speaker icon next to the filename.

Check your file size! This is going to impact the total size of your swf. You can adjust the compression settings here for this file only or in the Publish Settings panel for the whole movie.

Adding Audio to the Timeline

You add audio to a keyframe on the timeline, in the properties panel when you have a frame selected. The audio will start playing when the swf hits that frame.

Choose the sound you want to add with the ā€œNameā€ pulldown in the sound section of the properties panel.

Once you do this, you will see the waveform of the sound in the timeline.

Increase the height of the layer by control or right clicking the layer name and changing the layer height:

How the file will playback depends on how the Sync property is set. There are two primary settings you should concern yourself with here:

Event ā€“ Plays whole audio file. If you donā€™t want this, you can do some minor editing in the sound properties. This should be reserved for very short sounds, or you will get awkward echoing as the movie loops and continues to play the sound again and again.

Stream ā€“ Plays the sound only as long as the timeline. You can set the repeat and loop settings for replay, but this will always stop a previously playing sound before starting the next one.

The problem with both of these methods is that you arenā€™t giving the user any control over the playback of the sound. I generally avoid timeline sound in favor of one of the methods we will learn later in the class.

Homework

Choose a song with lyrics and import it into Flash. Create a 10-15 second animation of the song lyrics in time to the music using 3D tweens. The bulk of your animation should be text, but you can use other graphic elements if you like. If you are able to edit the audio file outside of Flash, cut it down to the portion of the track you wish to animate.

This entry was posted in Lessons. Bookmark the permalink.

Leave a Reply