1 / 7

Introduction to Flash and ActionScript , Part 3

Introduction to Flash and ActionScript , Part 3. CSC 361/661 Digital Media Spring 2010 Professor Burg. Types of Symbols. Graphic Movie clip Button

tobias
Download Presentation

Introduction to Flash and ActionScript , Part 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Flash and ActionScript, Part 3 CSC 361/661 Digital Media Spring 2010 Professor Burg

  2. Types of Symbols • Graphic • Movie clip • Button See 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.

  3. 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 symbol’s timeline (from the point in the main timeline where the graphic symbol is inserted). • Interactive controls and sounds won’t work in a graphic symbol’s animation sequence. • Add less to the FLA file size than buttons or movie clips because they have no timeline.

  4. Movie Clip • Has its own timeline that is independent from the main timeline • Can be given an instance name so that it can be referred to and manipulated through ActionScript • Can be dynamically allocated through ActionScript • Create the movie clip so that it’s in the library • When you create the movie clip, check the “Export for ActionScript” box • Dynamically 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.

  5. Button • 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 states • You define the “hit” area • You add an ActionListener to indicate what happens when the button is pressed. • See the example on the course blog.

  6. 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. • See the course blog for examples.

  7. 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. • 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.

More Related