introduction to flash and actionscript , part 3
Click here to load reader
Post on 07-Jan-2016
Embed Size (px)
DESCRIPTIONIntroduction to Flash and ActionScript , Part 3. CSC 361/661 Digital Media Spring 2010 Professor Burg. Types of Symbols. Graphic Movie clip Button - PowerPoint PPT Presentation
CSC 361/661Digital MediaSpring 2010Professor Burg
GraphicMovie clipButtonSee http://cartoonsolutions.com/store/catalog/Symbol-Types-sp-75.html for a good explanation of the difference between a movie clip and a graphic symbol.
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 symbols timeline (from the point in the main timeline where the graphic symbol is inserted). Interactive controls and sounds wont work in a graphic symbols animation sequence. Add less to the FLA file size than buttons or movie clips because they have no timeline.
Has its own timeline that is independent from the main timelineCan be given an instance name so that it can be referred to and manipulated through ActionScriptCan be dynamically allocated through ActionScriptCreate the movie clip so that its in the libraryWhen you create the movie clip, check the Export for ActionScript boxDynamically create an instance of the movie clip with a call to new. For example:var clown:MovieClip = new Face();clown.x = 200;clown.y = 200;clown.width = 200;clown.height = 200;addChild(clown);See the example on the course blog.
Interactive object that responds to mouse clicks, rollovers, or other actions. You define the what the button looks like in the up, over, and down statesYou define the hit areaYou add an ActionListener to indicate what happens when the button is pressed.See the example on the course blog.
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 cant 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. See the course blog for examples.
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.This tutorial shows you in a nutshell how to create a video to be played in the Flash player: http://tv.adobe.com/watch/learn-flash-professional-cs4/getting-started-10-working-with-video/ There are also good tutorials at Adobe Flash Help: Video.