Download presentation
Presentation is loading. Please wait.
Published byAnissa Francis Modified over 6 years ago
1
Chapter 19 - Macromedia Flash: Building Interactive Animations
Outline Introduction Flash Movie Development Learning Flash with Hands-on Examples Creating a Shape With the Oval Tool Adding Text to a Button Converting a Shape into a Symbol Editing Button Symbols Adding Keyframes Adding Sound to a Button Verifying Changes with Test Movie Adding Layers to a Movie Animating Text with Tweening Adding a Text Field Adding ActionScript
2
Chapter 19 - Macromedia® Flash™: Building Interactive Animations
Outline Creating a Projector (.exe) File With Publish Manually Embedding a Flash Movie in a Web Page Creating Special Effects with Flash Importing and Manipulating Bitmaps Create an Advertisement Banner with Masking Adding Online Help to Forms Creating a Web-Site Introduction ActionScript Internet and World Wide Web Resources
3
19.1 Introduction Macromedia Flash 5 Multimedia
Integrate audio, video, animation, graphics and user interactivity Produce Macromedia Flash files (movies) Embed movies in Web pages Create standalone applications ActionScript Macromedia Flash scripting language Enables interactivity
4
Install Macromedia Flash 5
19.1 Introduction Flash Player Plug-in Required to view Macromedia Flash movies Bundled with recent versions of browser software (IE and Netscape) Download Standalone player Embed in Web page Install Macromedia Flash 5 30 day trial download Includes latest version of Flash Player plug-in and standalone Flash player
5
19.1 Introduction System requirements
Macromedia Flash 5 is a processor-intensive application
6
19.2 Macromedia Flash Movie Development
Opening the program Creates a new file called Movie 1 Development Environment Stage White are where movie is developed Timeline Represents time lapse Divided into increments called frames Moments in time
7
19.2 Macromedia Flash Movie Development
Fig Macromedia Flash 5 development environment. (Courtesy of Macromedia, Inc.) Timeline Toolbox Layers Panel windows Main menu Frames Stage Zoom percentage Panels
8
19.2 Macromedia Flash Movie Development
Development Environment Toolbox Each tool has a specific function Active tool Tool options Change tool function
9
19.2 Macromedia Flash Movie Development
Fig Macromedia Flash 5 Toolbox. (Courtesy of Macromedia, Inc.) Arrow tool Line tool Pen tool Oval tool Pencil tool Ink bottle tool Dropper tool Hand tool Subselect tool Lasso tool Text tool Rectangle tool Brush tool Paint bucket tool Eraser tool Zoom tool Stroke color Fill color Tool Options
10
19.2 Macromedia Flash Movie Development
Development Environment Panels windows Panels Frequently used movie options Modify size, shape, color, alignment, effects Arrange anywhere in development environment Save Panel Layout Window > Save Panel Layout… Press Tab to hide all panels Restore default panel layout Window > Restore Panel Layout Open specific panels Window > Panel Sets
11
19.2 Macromedia Flash Movie Development
Fig Macromedia Flash 5 panels. (Courtesy of Macromedia, Inc.) Info Transform Stroke Fill Swatches Mixer Instance Effect Frame Sound Paragraph Character Text Options
12
19.3 Learning Macromedia Flash with Hands-on Examples
Build CEO Assistant 1.0 Interactive, animated button Produces random string when user presses Animated title Open new file File > New Save file with new name File > Save As .fla file extension Specific to Macromedia Flash editable movies
13
19.3 Learning Macromedia Flash with Hands-on Examples
Movie Properties Open Movie Properties dialog Modify > Movie… OR Right Click Stage, select Movie Properties Properties Frame Rate Movie speed Pocket PC (5-12 frames per second) Dimensions Movie size Background Color Stage color
14
19.3 Learning Macromedia Flash with Hands-on Examples
Fig Macromedia Flash 5 Movie Properties dialog. (Courtesy of Macromedia, Inc.) Background Color Fig Selecting a background color. (Courtesy of Macromedia, Inc.) Color selection eyedropper Hexadecimal color notation New background color
15
19.3.1 Creating a Shape with the Oval Tool
Graphics Vector Created with mathematical equations Define size, shape and color Better portability Raster Areas of colored pixels Render photographs and color detail better
16
19.3.1 Creating a Shape with the Oval Tool
Macromedia Flash graphics Created with vectors Fill Interior color Color selected in toolbox Stroke Border color
17
19.3.1 Creating a Shape with the Oval Tool
Drawing a shape Click and drag with shape tool Hold down Shift key to constrain proportions Keyframes Points of change Inserted automatically when a shape is drawn in empty frame
18
19.3.1 Creating a Shape With the Oval Tool
Fig Setting the fill and stroke colors. (Courtesy of Macromedia, Inc.) Stroke color Fill color Swap stroke and fill colors Default colors (black and white) No stroke or fill Fig Keyframe added to the timeline. (Courtesy of Macromedia, Inc.) Keyframe
19
19.3.1 Creating a Shape With the Oval Tool
Editing shape colors Arrow tool Click to select fill or stroke individually Use Shift key to select fill and stroke simultaneously Info panel Window > Panel > Info Change size of selected shape Constrained aspect ratio
20
19.3.1 Creating a Shape With the Oval Tool
Fig Making multiple selections with the arrow tool. (Courtesy of Macromedia, Inc.) Fig Modifying the size of a shape with the Info panel. (Courtesy of Macromedia, Inc.) Selection width Selection height Color Cursor location Selection location
21
19.3.1 Creating a Shape With the Oval Tool
Modify color Gradient fill Gradual progression of color Radial Linear Edit with the Fill panel
22
19.3.1 Creating a Shape With the Oval Tool
Fig Choosing a gradient fill. (Courtesy of Macromedia, Inc.) Gradient fills Red radial gradient fill
23
Creating a button title
Adding Text to a Button Creating a button title Text tool Click and type to create text Text Edit with the Character panel Window > Panel > Character Change font face, size, weight, color and spacing
24
Creating a button title
Adding Text to a Button Creating a button title Text Text strings are grouped objects Size, shape and color of individual letters cannot be edited using vector tools Ungroup Modify > Ungroup Text that has been ungrouped cannot be edited with the text tool or Character panel Regroup/group Modify > Group
25
Adding Text to a Button Fig Setting the font face, size, weight and color with the Character panel. (Courtesy of Macromedia, Inc.) Font Font height Font tracking Character position Linked URL Bold Italic Font kerning Text (fill) color Fig Adding text to the button. (Courtesy of Macromedia, Inc.)
26
19.3.3 Converting a Shape into a Symbol
Movie Structure Parent movie (scene) Contains all symbols, graphics, sounds etc. Main editing stage Symbol Reusable elements in movies Graphics, buttons, movie clips Separate editing stage from parent movie Instances Multiple appearances of the same symbol Saves time and reduces file size
27
19.3.3 Converting a Shape into a Symbol
Converting shapes into symbols Select items (text, fill and stroke) with arrow tool Once converted into symbol, items are treated as one Insert > Convert to Symbol or press F8 Symbol Properties dialog Symbol name (must be unique) Behavior Movie Clip Recurring animations Button Button actions (rollovers etc.) Graphic Static images
28
19.3.3 Converting a Shape into a Symbol
Fig Selecting an object with the arrow tool. (Courtesy of Macromedia, Inc.)
29
19.3.3 Converting a Shape into a Symbol
Library panel Stores symbols Window > Library or Ctrl + L Use to create multiple instances Drag and drop from Library panel to stage
30
19.3.3 Converting a Shape into a Symbol
Fig Creating a new symbol with the Symbol Properties dialog. (Courtesy of Macromedia, Inc.) Fig Library panel. (Courtesy of Macromedia, Inc.)
31
19.3.3 Converting a Shape into a Symbol
Movie Explorer Window > Movie Explorer or Right click stage and select Movie Explorer… Shows relationship between parent movie and symbols
32
19.3.4 Editing Button Symbols
Fig Movie Explorer for ceoassist.fla. (Courtesy of Macromedia, Inc.)
33
19.3.4 Editing Button Symbols
Symbol contents cannot be edited in parent movie Must use symbol editing stage Access by double clicking symbol in parent movie or Press edit symbols button and select symbol name
34
19.3.4 Editing Button Symbols
Editing button symbol, cont. Button states Use to create button effects (rollovers, click sounds etc.) Up Button default state before it is clicked Over When mouse rolls over button Cannot use with wireless devices Down When mouse or input device clicks/taps button Add sound to this state to create click sound Hit Defines button’s tap/click sensitive area Add keyframes to button states to create effects
35
19.3.4 Editing Button Symbols
Fig Modifying button states with a button’s editing stage. (Courtesy of Macromedia, Inc.) Active symbol Return to main scene Keyframe Current frame Zoom percentage Edit symbols Button states Edit scene
36
19.3.5 Adding Keyframes Keyframes
Determine changing points in timeline Appear gray with black dot in timeline Add keyframe to timeline Right click frame and select Insert Keyframe OR Select frame and press F6 Add keyframe to over frame to create rollover Select button in over frame and change fill color Changing color in this state does not affect other states
37
Adding Keyframes Fig Inserting a keyframe. (Courtesy of Macromedia, Inc.) Insert Keyframe Selected Over frame Frame options
38
19.3.6 Adding Sound to a Button
Sound added to button To up state Plays when button is not clicked To over state Plays when mouse rolls over button’s hit area To down state Plays when user clicks button Free download sounds FlashKit ( Muinar (
39
19.3.6 Adding Sound to a Button
Import sound files into Macromedia Flash File formats Windows Waveform (WAV) Audio Interchange File Format (AIFF) Mac only MPEG layer 3 (MP3) Import from file File > Import then select audio file Adds sound to movie library
40
19.3.6 Adding Sound to a Button
Add sound to button Select over frame Open Sound panel Window > Panel Sets > Sound Select file name from Sound drop-down list SYNC EVENT
41
19.3.6 Adding Sound to a Button
Fig Adding sound to a button. (Courtesy of Macromedia, Inc.) Sound Sync Sound added to the Down frame
42
19.3.6 Adding Sound to a Button
Set sound properties Double click sound icon in Library panel Compression APDCM RAW Sample Rate 11 or 22 kHz Pre-processing Stereo or mono
43
19.3.6 Adding Sound to a Button
Fig Optimizing sound with the Sound Properties dialog. (Courtesy of Macromedia, Inc.) Sound name Compression Sample Rate Preprocessing Sound clip size and compression
44
19.3.7 Verifying Changes with Test Movie
Published state How the movie appears on the Web Can be viewed on desktop computer with Flash Player SWF (“swiff”) file Embedded into Web document Control > Test Movie or Ctrl+Enter Export to Flash Player
45
19.3.7 Verifying Changes with Test Movie
Fig GO button in its up and over states. (Courtesy of Macromedia, Inc.)
46
19.3.8 Adding Layers to a Movie
Organize movie elements Rename layer Double-click layer name Insert layer Insert > Insert layer or click insert layer button Active layer is highlighted blue Create layer for animated title Animated title Set alignment, size and color with Character panel
47
19.3.8 Adding Layers to a Movie
Fig Renaming a layer. (Courtesy of Macromedia, Inc.) Rename a layer Insert a new layer Delete layer Fig Setting text alignment with the Paragraph panel. (Courtesy of Macromedia, Inc.) Left justify Center justify Left margin Indentation Right justify Full justify Right margin Line spacing Fig Creating a title with the text tool. (Courtesy of Macromedia, Inc.)
48
19.3.9 Animating Text with Tweening
Animation Title animation over a series of frames Animation types Frame-by-frame Tweened Shape Morphing ungrouped shapes from one into another Motion Moving grouped objects or symbols on stage
49
19.3.9 Animating Text with Tweening
Tweened animation Appearance and position at beginning (frame 1) Appearance and position at end (frame 15) Insert keyframe into Frame 15 Change title size and position Add motion tween to frame 1 Right click frame 1 and select Create Motion Tween or Use the Frame panel Intermediate frames contain the image in the correct position Playhead Red highlight that indicates frame position
50
19.3.9 Animating Text with Tweening
Fig Adding a keyframe to create an animation. (Courtesy of Macromedia, Inc.) Fig Creating a motion tween. (Courtesy of Macromedia, Inc.)
51
19.3.9 Animating Text with Tweening
Adding ActionScript to prevent looping Frame Actions dialog Right click frame 15 and select Actions or Select frame 15 and press Ctrl+Alt+A Add a stop action Double click Basic Actions and select Stop Action indicated by small a in frame 15
52
19.3.9 Animating Text with Tweening
Fig Adding ActionScript to a frame with the Frame Actions dialog. (Courtesy of Macromedia, Inc.) Basic Actions Add new item to the script Actions menu Stop action Movie Explorer Action added to a frame ActionScript window Action applied to a frame Fig Moving a keyframe.(Courtesy of Macromedia, Inc.)
53
Establishing text field settings
Adding a Text Field Text field options Dynamic Text that can be changed by outside variables Static Text that remains unchanged Input Text that is input by the user Establishing text field settings Text Options panel Window > Panel > Text Options Set variable name Draw text field with text tool
54
Adding a Text Field Fig Creating a dynamic text field with the Text Options panel. (Courtesy of Macromedia, Inc.) Text type Variable name Fig Creating a text field. (Courtesy of Macromedia, Inc.)
55
19.3.11 Adding ActionScript Add to button symbol Object Actions dialog
Button symbol will change text in text field Object Actions dialog Right click button symbol in parent movie, select Actions Add action which performs function when user presses button on Change on (release) to on (press) Add action which sets a variable when on function is performed Set Variable on (press) { <not set yet> = “”; }
56
Object Actions dialog, cont.
Adding ActionScript Object Actions dialog, cont. Change variable name Add function which sets variable equal to random number between 1 and 5 random on (press) { randomNumber = random (5); }
57
Adding ActionScript Fig Adding an action to a button with the Object Actions dialog. (Courtesy of Macromedia, Inc.) Add action
58
Object Actions dialog, cont.
Adding ActionScript Object Actions dialog, cont. Add a conditional statement which sets text field variable equal to text string depending on variable randomNumber value if on (press) { randomNumber =random(5); if (<not set yet>) { } }
59
Object Actions dialog, cont.
Adding ActionScript Object Actions dialog, cont. Nested if statements (one for each condition) else if on ( press ) { randomNumber = random ( 5 ); if ( randomNumber == 0 ) { } else if ( <not set yet> ) { } else if ( <not set yet> ) { } else if ( <not set yet> ) { } else if ( <not set yet> ) { } }
60
Object Actions dialog, cont.
Adding ActionScript Object Actions dialog, cont. Set condition Change first <not set yet> into randomNumber == 1 Do the same for each else if statement increasing value by 1 Set the value of text field variable for each statement
61
19.3.11 Adding ActionScript Final script
on ( press ) { randomNumber = random ( 5 ) if ( randomNumber == 0 ) { advicefield = "Hire Someone!"; } else if ( randomNumber == 1 ) { advicefield = "Buy a Yacht!"; } else if ( randomNumber == 2 ) { advicefield = "Buy Stock!"; } else if ( randomNumber == 3 ) { advicefield = "Go Golfing!"; } else { advicefield = "Hold A Meeting!"; } }
62
19.4 Creating a Projector (.exe) File With Publish
Publishing Macromedia Flash movies Similar to exporting in other applications Creating a Windows Projector EXE standalone application Publish Settings dialog File > Publish Settings… Select output formats Flash (SWF) Windows Projector (EXE) Flash settings Versions Sound optimization
63
19.4 Creating a Projector (.exe) File With Publish
Fig Published Macromedia Flash files. Windows Executable (.exe) Macromedia Flash (.fla) Flash Player movie (.swf)
64
19.5 Manually Embedding a Macromedia Flash Movie in a Web Page
Embed SWF into HTML or XHTML document Browser compatibility Any browser with the Flash Player plug-in displays Macromedia Flash movies the same Use two tags to embed SWF file for different browsers <object> tag Calls Flash Player ActiveX control in IE <embed> tag Calls Flash Player plug-in for Netscape Communicator Must be within <object> tag
65
19.5 Manually Embedding a Macromedia Flash Movie in a Web Page
Embed SWF into HTML or XHTML document Browser compatibility <noembed> tag Provides alternative content to users without the plug-in Contained within the <embed> tag Can contain HTML or XHTML tags within it
66
URL of rendering mechanism specified by the classid attribute
1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " 4 5 <!-- Fig. 19.33: ceoassist.html > 6 <!-- Embedding a Flash movie into a Web site --> 7 8 <html xmlns = " 9 <head> <title>Adding Flash to your Web site</title> </head> 13 <body> 15 <!-- the following object tag tells the > <!-- Microsoft Internet Explorer browser to --> <!-- play the Flash movie and where to find --> <!-- the Flash Player plug-in if it is not --> <!-- installed > 21 <object classid = "clsid:D27CDB6E-AE6D-11cf-96B " codebase = " /swflash.cab#version=5,0,0,0"> <param name = "Movie" value = "ceoassist.swf" /> 27 <!-- the following embed tag tells the Netscape --> <!-- Navigator browser to play the Flash movie --> <!-- and where to find the Flash Player plug-in --> <!-- if it is not installed > 32 Ceoassist.html Embeds ceoassist.swf so it can be rendered within a Web browser. object element used to embed a Macromedia Flash movie for IE. Calls ActiveX control. URL of rendering mechanism specified by the classid attribute codebase attribute is base path for URL specified by classid attribute
67
33 <embed src = "ceoassist.swf" plug-inspage =
" index.cgi?P1_Prod_Version=ShockwaveFlash"> </embed> 37 <noembed> This Web site contains the CEO Assistant 1.0 Flash movie. You must have the Flash Player plug-in to view the Flash movie. </noembed> 43 </object> 45 </body> 47 </html> embed element calls Netscape plug-in. Must be within <object> tags PLUGINSPACE tells user where to get Netscape plugin for the Macromedia Flash Player if it is not already installed Ceoassist.html noembed element contains alternative content for users who cannot view the Macromedia Flash movie
68
19.6 Creating Special Effects with Macromedia Flash
Advanced Macromedia Flash techniques Importing bitmaps Masking Shape tweening Hyperlinking Triggered animations Preloading animation
69
19.6.1 Importing and Manipulating Bitmaps
Import raster (bitmapped) image May be photograph or graphic created with a graphics application Photoshop, Paint Shop Pro, Freehand, Illustrator etc. File > Import Convert imported image to editable graphic Select image Modify > Break Apart Edit or create original graphics Eraser tool Paintbrush tool Lasso tool Tool options
70
19.6.2 Create an Advertisement Banner with Masking
Advertising Banner Imported bitmapped graphic Scale with arrow tool scale option Title Animation Masking Hides items in layers beneath In shape of title to mask animation
71
19.6.2 Create an Advertisement Banner with Masking
Fig Resizing an image with the move tool scale option. (Courtesy of Macromedia, Inc.) anchor
72
19.6.2 Create an Advertisement Banner with Masking
Advertising Banner, cont. Title Create in frame 1 of top layer Becomes the mask Copy frame and paste into frame 1 of bottom layer Visible through the mask
73
19.6.2 Create an Advertisement Banner with Masking
Advertising Banner, cont. Masked animation Circle filled with rainbow linear gradient that moves from left side to right side of stage Create circle with no stroke/border Convert to graphic symbol Animation Frame 1 (left side) Frame 20 (right side) Frame 40 (left side) Motion tween at frame 1 and at frame 20
74
19.6.2 Create an Advertisement Banner with Masking
Fig Creating the Circle graphic. (Courtesy of Macromedia, Inc.) Rainbow gradient fill No stroke
75
19.6.2 Create an Advertisement Banner with Masking
Advertising Banner, cont. Masking Turn top layer into mask Right click top layer and select Mask Mask is not visible in final movie Only animation, beneath the mask and the title in the bottom layer.
76
19.6.2 Create an Advertisement Banner with Masking
Fig Creating a mask layer. (Courtesy of Macromedia, Inc.) Masking layer Masked layer Locked for editing
77
19.6.2 Create an Advertisement Banner with Masking
Fig Completed banner.
78
19.6.3 Adding Online Help to Forms
Adding interactivity Online help to forms Help buttons Trigger animations which provide information to user Form Title Form field captions Adjust line spacing
79
19.6.3 Adding Online Help to Forms
Fig Adjusting the line spacing with the Paragraph panel. (Courtesy of Macromedia, Inc.) Line-spacing adjustment Right justify
80
19.6.3 Adding Online Help to Forms
Adding interactivity, cont. Form, cont. Form field Create rectangle shape with rounded corners Rectangle tool option Double click option to set corner radius Convert to graphic symbol that can be reused throughout movie Place an instance next to each form caption
81
19.6.3 Adding Online Help to Forms
Fig Creating a rectangle with rounded corners. (Courtesy of Macromedia.)
82
19.6.3 Adding Online Help to Forms
Fig Creating multiple instances of a symbol with the Library panel. (Courtesy of Macromedia, Inc.)
83
19.6.3 Adding Online Help to Forms
Adding interactivity, cont. Form, cont. Help button One instance next to each form field Button ActionScript on (release) { gotoAndStop(2); } Frame number (2) increases by one for each button Frame contains the movie clip help animation
84
19.6.3 Adding Online Help to Forms
Adding interactivity, cont. Form, cont. Help animation New movie clip Shape tween Dot (frame 1) > line (frame 5) > rectangle (frame 10) Use Info panel to change size and shape and alignment Add shape tween to frame 1 and 5 using Frame panel
85
19.6.3 Adding Online Help to Forms
Fig Centering an image on the stage with the Info panel. (Courtesy of Macromedia, Inc.) Registration selection Center alignment Fig Creating a shape tween. (Courtesy of Macromedia, Inc.)
86
19.6.3 Adding Online Help to Forms
Adding interactivity, cont. Form, cont. Help animation Instance of form field symbol in new layer Create shape tween animation with form field symbol Use Transform panel to modify the symbol size Scale factor 0% (frame 10) > 150% (frame 20) > 100% (frame 25) Add help text to new layer Duplicate movie clip symbol using Library panel one for each help button
87
19.6.3 Adding Online Help to Forms
Fig Adding the field symbol to the nameWindow movie clip. (Courtesy of Macromedia, Inc.) Fig Creating an animation with the form field symbol. (Courtesy of Macromedia, Inc.)
88
19.6.3 Adding Online Help to Forms
Fig Duplicating movie clip symbols with the Library panel. (Courtesy of Macromedia, Inc.) Current symbol Symbols to edit Edit scene Edit symbols
89
19.6.3 Adding Online Help to Forms
Adding interactivity, cont. Form, cont. Movie clip symbol Frame by frame animation for form field Simulates typing action Create in new layer Text field, add one more letter in each consecutive keyframe Repeat for all three movie clips Modify help text in each movie clip symbol
90
19.6.3 Adding Online Help to Forms
Fig Creating a frame-by-frame animation. (Courtesy of Macromedia, Inc.) Deleting a letter from each subsequent frame Frames for animation
91
19.6.3 Adding Online Help to Forms
Adding interactivity, cont. Form, cont. Place movie clip symbols in parent movie in correct frame (2,3 or 4) so that animation plays when user presses help button
92
19.6.3 Adding Online Help to Forms
Fig Bug2Bug.com help form. (Courtesy of Macromedia, Inc.)
93
19.7 Creating a Web-Site Introduction
Used to pre-load larger items into movie Reduces delay Maintains user interest Many methods to create Use ActionScript to pause movie until all items are loaded ActionScript method First create items which are preloaded Movie clip symbols which contain animations Motion tween rotate option Three rotating books Add symbols to frame 2 each in its own new layer
94
19.7 Creating a Web-Site Introduction
Fig Creating a rotating object with the motion tween Rotate option. (Courtesy of Macromedia, Inc.) Times Rotate Fig Inserted movie clips.
95
19.7 Creating a Web-Site Introduction
ActionScript method, cont. Preloading animation Place in frame 1 of its own layer Create as movie clip symbol Shape tween radial gradients Create radial gradient and modify with Fill panel Insert keyframes in frame 7 and 14 Modify gradient in frame 7 Add shape tween to frame 1 and 7
96
19.7 Creating a Web-Site Introduction
Fig Changing gradient colors with the Fill panel. (Courtesy of Macromedia, Inc.) Fill type Gradient range Gradient color swatch Gradient preview Outer color Inner color Save gradient Fig Adding an intermediate color to a gradient. (Courtesy of Macromedia, Inc.) Click and drag to remove a color Resulting gradient
97
19.7 Creating a Web-Site Introduction
ActionScript method, cont. Preloading animation Add button symbol to animation allows user to skip over loading to final site Create as text Modify hit state to include spaces between letters
98
19.7 Creating a Web-Site Introduction
ActionScript method, cont. Preloading animation, cont. Add getURL action to button Hyperlinks button to another site URL: Target Blank, loads URL into new window Self, loads URL into current window on ( release ) { getURL ( “ “_blank” ); }
99
19.7 Creating a Web-Site Introduction
ActionScript method, cont. Parent movie Add ActionScript to loading movie clip onClipEvent (enterFrame) Specifies playhead position if conditional statement which tests if all frames are loaded onClipEvent (enterFrame) { if (_framesloaded > 2 && _framesloaded == _current frame) } Tests if the number of frames loaded is greater than the frame which contains the loaded objects (frame 2) AND If the number of frames loaded is equal to the current frame
100
19.7 Creating a Web-Site Introduction
ActionScript method, cont. Parent movie, cont. Add ActionScript to loading movie clip, cont. goto action tells the movie to skip to frame and play or skip to frame and stop onClipEvent ( enterFrame ) { if ( _framesloaded > 2 && _framesloaded == _current frame) {gotoAndPlay ("Scene 1", 2);} } Skips to frame 2 and plays loaded objects Add stop action to frame 2 Stops movie after animations have played
101
19.7 Creating a Web-Site Introduction
Fig Defining a button’s hit area. Hit state Up state Fig Creating an animation to preload images. Rotating counter-clockwise Text hyper-linked buttons
102
19.8 ActionScript
103
19.8 ActionScript
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.