180 likes | 414 Views
Introduction to Flash and ActionScript. CSC 361/661 Digital Media Spring 2010 Professor Burg. What is Flash good for?. Originally designed for vector graphics Also handles bitmap images, sound, and video
E N D
Introduction to Flash and ActionScript CSC 361/661 Digital Media Spring 2010 Professor Burg
What is Flash good for? • Originally designed for vector graphics • Also handles bitmap images, sound, and video • You can draw things on the stage or import images and apply tweening effects, or you can dynamically create objects in ActionScript and manipulate the objects with ActionScript code. • See http://www.adobe.com/devnet/flash/sample for sample programs • See Adobe Help Site for video tutorials on Flash and ActionScript. • See the course blog for more examples. http://burgdigitalmediablog.tumblr.com.
The Flash Workspace • Stage • Draw on stage with drawing tools. • Import images into library and drag them onto the stage. • Timeline • Frame-based, 24 frames per second • Keyframes are places where what is on the stage can change from what was there on the previous keyframe. • Layers allow you to separate objects and manipulate them separately. This is especially helpful if you want to apply a shape tween (See FlowersGrowing and FlowersGrowingWell) or you want to make one object move behind another. • Panels • Properties panel • Library • History panel, and so forth
Drawing Tools • Rectangle (Hold shift to make it square.) • Oval (Hold shift to make it round.) • Setting stoke and fill. (You can make them the same by dragging eye dropper from one to other.) • Selecting something after it is drawn. • Note the difference between object drawing and merge drawing. The letter j toggles between the two, or you can use the little button on the drawing panel. But toggling doesn’t work until you have a drawing tool selected. • Merge drawing causes one object to take a slice out of another if it is drawn on top and then moved away.
Drawing Tools • Other drawing tools • line • pencil tool • brush and spray brush tool • paint bucket, ink bottle • pen tool • useful for curves • learn how to use it! • Text tool • Notice that the properties panel changes with each tool selected, giving you access to the parameters that you can control
Selection Tools • Selection tool • Subselection tool • Chooses a single point on a complex object, like a corner, endpoint, or spline control point • Useful in controlling splines (aka curves) • Free transform tool • Rotate tool • See the first six videos at http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WS3C5136D8-8D46-4d6d-9AA9-8438BAA91F9D.html for what we’ve covered so far.
Importing Media into Flash • Media support • Bitmap images • Vector graphics • Sound • Video • Do File/Import/Import to Library. Then drag an instance from the library to the stage. • The library contains media that you import as well as symbols you create. The symbols can be Graphic, Movie Clip, or Button.
Importing Bitmap Images • Create your bitmap to be the size you want it to be in the Flash movie. Don’t make it bigger than needed and then resize it in Flash. • You can click the Properties button in the Library panel and see the compression settings.
Importing Vector Graphics from Illustrator • If you like drawing in Illustrator, you can do your drawing there and transfer the AI files over to Flash. • The AI layers are converted to Flash layers if you choose this option. • The Flash Help has links to videos about importing and using AI files. See Help: Using AI Files
Importing Sound • There are quite a few supported sound file types, including WAV, MP3, and AIFF. • Import with File/Import/Import to Library. Make a layer for the sound. Drag the sound from the Library to that layer. Set the option appropriately to Event, Start, Stop, or Stream. • Description of sound options: • An Event sound synchronizes with an event. An event sound, such as a sound that plays when a user clicks a button, plays when its starting keyframe first appears and plays in its entirety, even if the SWF file stops playing. • A Start sound is the same as Event, except that if the sound is already playing, no new instance of the sound plays. • Stop silences the specified sound. • A Stream sound forces animation to keep pace with the sound. If Flash can’t draw animation frames quickly enough, it skips frames. Unlike event sounds, stream sounds stop if the SWF file stops playing. Also, a stream sound can never play longer than the length of the frames it occupies. Stream sounds are mixed when you publish your SWF file.An example of a stream sound is the voice of a character in an animation that plays in multiple frames.
Importing Video • You can create video if you want to. I have a couple of good video cameras you can borrow, including a new HD one. • Make a short clip, compress it as FLV or H.264, and put it into your Flash movie. • There are good tutorials at Adobe Flash Help: Video, including video tutorials.
Types of Symbols • Graphic symbols are for • static images or animations that are tied to the main Timeline. • Synchronized with the main Timeline. The main timeline must have enough frames to hold the number of frames in the graphic symbol’s timeline (from the point in the main timeline where the graphic symbol is inserted). as theInteractive controls and sounds won’t work in a graphic symbol’s animation sequence. Graphic symbols add less to the FLA file size than buttons or movie clips because they have no timeline. • Button symbols are interactive buttons that respond to mouse clicks, rollovers, or other actions. You define the graphics associated with various button states, and then assign actions to a button instance. • Movie clip symbols are reusable pieces of animation with their own timeline that is independent from the main timeline.
Shape Tweening • Shape tweening • Can tween shape, color, position, scale, rotation, skew • Can tween text that has been broken apart • Can tween gradients • Shape tweening cannot tween • Grouped objects • Symbols • Text that has not been broken apart • Use shape tweening for fine-tuned tweening and morphing of shapes • You can use tweening hints with shape tweening.
Motion Tweening • Motion tweening can tween • Grouped object, symbols, and text blocks • Motion tweening cannot tween • Shapes • Broken-apart text