7-1 OBJ Copyright 2003, Paradigm Publishing Inc. Using ActionScript and Creating Templates Macromedia Flash Design & Application.

Slides:



Advertisements
Similar presentations
Chapter 6 Preparing and Publishing Applications. Chapter 6 Lessons 1.Publish movies 2.Reduce file size to optimize a movie 3.Create a preloader 4.Publish.
Advertisements

© 2010 Delmar, Cengage Learning Chapter 9: Using ActionScript.
Understand the Macromedia Flash environment Open a document and play a movie Create and save a movie Work with layers and the timeline Plan a Web site.
The Web Warrior Guide to Web Design Technologies
 2004 Prentice Hall, Inc. All rights reserved. Chapter 18 – Macromedia Flash MX 2004: Building an Interactive Game Outline 18.1 Introduction 18.2 Object-Oriented.
Macromedia Flash MX 2004 – Design Professional and Interactivity WORKING WITH SYMBOLS.
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
Macromedia Flash MX 2004 – Design Professional Macromedia Flash MX GETTING STARTED WITH.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Introduction to Macromedia Flash 8
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
© 2011 Delmar, Cengage Learning Chapter 8 Building Complex Animations.
Chapter 17 Putting It All Together. Viewing the Preloader To view the preloader, 1.CTRL-Enter to test the movie. 2.View > Simulate Download.
© 2010 Delmar, Cengage Learning Chapter 6: Preparing and Publishing Movies.
6-1 OBJ Copyright 2003, Paradigm Publishing Inc. Animating Using Symbols and Masks and Publishing Flash Movies Macromedia Flash Design & Application.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Chapter 3 Working with Symbols and Interactivity.
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
1 Flash Basics by Dr SC Li. 2 File Types  In general, Flash 5.0 generates 3 types of files:  ???.fla  Flash ’ s working file  ???.swf  Flash movie.
Flash MX II. Flash MX – Tweened Animation There are two methods for creating an animation sequence in Flash –Frame-by-frame animation –Tweened animation.
Tutorial 5 Making a Document Interactive. XP Objectives Explore the different button states Add a button from the Button library Create a button Learn.
Tutorial 5 Making a Document Interactive. XP Objectives Explore the different button states Add a button from the Buttons library Edit a button instance.
4-1 OBJ Copyright 2003, Paradigm Publishing Inc. Creating Animation and Guidelines for Flash Project Design Macromedia Flash Design & Application.
Chapter 11 Adding Sound and Video. Chapter 11 Lessons 1.Work with sound 2.Specify synchronization options 3.Modify sounds 4.Use ActionScript with sound.
© 2011 Delmar, Cengage Learning Chapter 9 Introduction to ActionScript 3.0.
Dm 11 – Intro. To Flash Macromedia Flash MX GETTING STARTED WITH.
1-1 OBJ Copyright 2003, Paradigm Publishing Inc. Dr. Joseph Otto Silvia Castaneda Christopher deCastro CSULA Macromedia Flash MX Introduction.
1-1 OBJ Copyright 2003, Paradigm Publishing Inc. Drawing Fundamentals Macromedia Flash Design & Application.
Macromedia Flash CS4. What is Flash CS4? –Animation and interactive authoring program –Tools for complex animation, as well as excellent drawing tools.
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
Adobe Flash CS3 Revealed Chapter 1 - GETTING STARTED WITH FLASH.
© 2010 Delmar, Cengage Learning Chapter 3: Working with Symbols and Interactivity.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
XP Tutorial 4 Special Animations. XP New Perspectives on Macromedia Flash MX Special Layers for Animation Animation Using a Motion Guide Layer.
Tutorial 7 Planning and Creating a Flash Web Site.
Creating Buttons – Lesson 71 Creating Buttons Lesson 7.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target.
Motion Tweening – Lesson 81 Motion Tweening Lesson 8.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
5-1 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Sound, Video, and Basic Interactivity with Buttons Macromedia Flash Design & Application.
UNIT-V MULTIMEDIA APPLICATIONS Learning objectives To learn about symbols and instancesTo learn about symbols and instances To learn how to use Flash Action.
XP Tutorial 8 Adding Interactivity with ActionScript.
Building the Events Components– Lesson 111 Building the Events Components Lesson 11.
Macromedia Flash 8 Revealed WORKING WITH SYMBOLS AND INTERACTIVITY.
© 2011 Delmar, Cengage Learning Chapter 10 Using ActionScript to Enhance User Experience.
XP Tutorial 7 Creating a Flash Web Site. XP New Perspectives on Macromedia Flash 82 Objectives Plan and create a Flash Web site Create a Flash template.
Tutorial 3 Creating Animations. XP Objectives Learn the different elements of animation Create frames and layers Organize frames and layers using the.
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
SCRIPT PROGRAMMING WITH FLASH Introductory Level 1.
Tutorial 7 Creating Animations. XP Objectives Learn about animation Create a timeline Add AP divs and graphics to a timeline Move and resize animation.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
CIS 205—Web Design & Development Flash Chapter 3 Appendix on Using Buttons.
© 2011 Delmar, Cengage Learning Chapter 11 Adding Sound and Video.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
XP Tutorial 3 Creating Animations. XP New Perspectives on Macromedia Flash MX Elements of Animation Layers are used to organize the content of.
XP Tutorial 8 Adding Interactivity with ActionScript.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
Macromedia Flash Design Professional Macromedia Flash GETTING STARTED WITH.
Creating a Flash Web Site
Adding Buttons, Actions, and Sounds
Chapter Lessons Understand the Macromedia Flash workspace
Exercise 63 Use a Flash movie clip symbol to store an animation that you need to use more than once in an application. This is very important for keeping.
Working with Symbols and Interactivity
Presentation transcript:

7-1 OBJ Copyright 2003, Paradigm Publishing Inc. Using ActionScript and Creating Templates Macromedia Flash Design & Application

7-2 OBJ Copyright 2003, Paradigm Publishing Inc.  Define the terms object-oriented programming, object, method, action, event, and parameters. Define the terms object-oriented programming, object, method, action, event, and parameters.  List general guidelines for creating ActionScript in movies. List general guidelines for creating ActionScript in movies.  Switch between Normal mode and Expert mode in the Actions panel and describe the difference between the two modes. Switch between Normal mode and Expert mode in the Actions panel and describe the difference between the two modes.  Add actions to keyframes, buttons, and movie clips. Add actions to keyframes, buttons, and movie clips.  Use the goto and stop actions to control movie playback. Use the goto and stop actions to control movie playback.  Add labels and comments to frames. Add labels and comments to frames.  Create a preloader animation. Create a preloader animation.  Perform a conditional test on a movie property. Perform a conditional test on a movie property. Performance Objectives

7-3 OBJ Copyright 2003, Paradigm Publishing Inc.  Create buttons to toggle the playback of a stream soundtrack on and off. Create buttons to toggle the playback of a stream soundtrack on and off.  Use the with action to target start and stop actions at a movie clip instance. Use the with action to target start and stop actions at a movie clip instance.  Use the getURL action to open a Web page during a movie. Use the getURL action to open a Web page during a movie.  Use the fscommand action to control a projector window. Use the fscommand action to control a projector window.  Create and use a Flash template. Create and use a Flash template.  Use the Movie Explorer. Use the Movie Explorer.  List Web resources for learning more about Flash. List Web resources for learning more about Flash.  COMMANDS REVIEW COMMANDS REVIEW Performance Objectives

7-4 OBJ Copyright 2003, Paradigm Publishing Inc. Understanding ActionScript Concepts and Terms  ActionScript is a scripting language  scripts are a series of commands that provide instruction to the computer  commands are generally carried out in sequence  generally easy to understand  Learning ActionScript involves:  learning the keywords  using proper syntax

7-5 OBJ Copyright 2003, Paradigm Publishing Inc. Object-Oriented Programming  ActionScript is an object-oriented scripting language  similar to JavaScript  Classes are defined with a set of properties and methods  defines the object's characteristics and behavior  instances of a class are referred to as objects  Existing code can be reused  more efficient and easier to maintain

7-6 OBJ Copyright 2003, Paradigm Publishing Inc. Actions, Events, and Parameters  Actions  statements that instruct Flash on what to do with a target object  listed in the toolbox in the Actions panel  Events  an event can be a mouse movement, a key pressed on the keyboard, or the loading of a movie clip  the event triggers the action  actions applied to a button or movie clip instance execute when an event occurs  Parameters  also called arguments  provide the variable information for the action statement

7-7 OBJ Copyright 2003, Paradigm Publishing Inc. General Guidelines for Writing ActionScript  Before starting to write ActionScript code you should have:  a clear definition of the goal of the movie  a flow chart diagramming the movie's actions  a plan as to which objects will require ActionScript statements  Use comments to document what is happening at key points  Focus on one section at a time until it is working correctly  then save as a separate version as a backup  Object and variable names should be descriptive labels  easily identify the element

7-8 OBJ Copyright 2003, Paradigm Publishing Inc. The Actions Panel in Normal Mode Window, Actions or F9 Flash assists you with the programming. The proper syntax for each statement is inserted. Step 1 Double-click action in toolbox. Step 2 Add parameters if the action has any. Flash builds the code for you.

7-9 OBJ Copyright 2003, Paradigm Publishing Inc. The Actions Panel in Expert Mode The parameters area is replaced with a larger ActionScript area. Step 1 Double-click action in toolbox. Step 2 Key parameters using proper syntax. Flash does not build the statement for you. Use code hints to view available parameters for the current action. Check SyntaxShow Code Hint Code Hint Switching from Expert mode to Normal code causes Flash to check the syntax. show next code hint

7-10 OBJ Copyright 2003, Paradigm Publishing Inc. Controlling Movie Playback

7-11 OBJ Copyright 2003, Paradigm Publishing Inc. GotoGoto  Moves the playhead to a different frame in the Timeline  Destination parameter can be specified using a frame number or a frame label  using frame labels is preferable since the label stays with the frame when editing  Includes two choices when it reaches the destination  Go to and Play  Go to and Stop

7-12 OBJ Copyright 2003, Paradigm Publishing Inc. OnOn  Dimmed unless a button instance is active  Creates the event handler that specifies to which mouse event you want the action to respond  multiple events can be selected

7-13 OBJ Copyright 2003, Paradigm Publishing Inc. Play, Stop, and StopAllSounds  Play  uses no parameters  instructs Flash to begin playing the movie at the point in the Timeline at which the action is executed  Stop  uses no parameters  instructs Flash to stop playing the movie  StopAllSounds  stops all sounds that are currently playing  stream sounds will resume playing when the playhead reaches the frame in which it has been associated

7-14 OBJ Copyright 2003, Paradigm Publishing Inc. Assigning Labels to a Keyframe -to reference the destination by name instead of number -if frames are added, moved, or removed, no change is required to the ActionScript. key a name frame label displays next to a red flag

7-15 OBJ Copyright 2003, Paradigm Publishing Inc. Assigning Comments to a Keyframe -helps you to remember what is happening in segments of the Timeline -editing is made easier precede comment text with two forward slashes usually entered in a separate layer two green slashes display in front of comment text Comments can also be added in ActionScript code.

7-16 OBJ Copyright 2003, Paradigm Publishing Inc. Creating a Preloader Animation  A simple animation at the beginning of a movie that loops until the download is completed  Key concepts:  small animation at the beginning that contains simple text such as a Loading message  ActionScript is added at the end to create a loop  ActionScript is added at the first frame that performs a conditional test

7-17 OBJ Copyright 2003, Paradigm Publishing Inc. Performing a Conditional Test  Use the if action  Can have two possible outcomes  true  false  A false action is not required since Flash will simply skip the actions in the curly braces and move to the next line of code if the conditional test proves false if (conditional test) { action to be performed if test is true }

7-18 OBJ Copyright 2003, Paradigm Publishing Inc. Adding an Else Statement  Use to specify a false action  Add immediately after the if action if (frames loaded = all frames) { gotoAndPlay(main movie); } else { gotoAndPlay(preloader animation); }

7-19 OBJ Copyright 2003, Paradigm Publishing Inc. Nesting If Statements  To perform a test that has more than two possible outcomes  Add an else if action after the initial if block if (frames loaded = all frames) { gotoAndPlay(main movie); } else if (frames loaded > 10) { gotoAndPlay(preloader animation B); } else { gotoAndPlay(preloader animation A); }

7-20 OBJ Copyright 2003, Paradigm Publishing Inc. Testing for Status of Frames Loaded  Each movie Timeline has a set of properties identified with an underscore character in front of the property name that can be checked or modified  _framesloaded property returns the number of frames that have been downloaded  _totalframes property returns a value representing the total number of frames within a movie

7-21 OBJ Copyright 2003, Paradigm Publishing Inc. Testing for Status of Frames Loaded…/2  Properties are identified with an underscore character at the beginning  Two equals symbols (equality operator) tells Flash to check if the value for the property on the left equals the value for the property on the right (_framesloaded == _totalframes)

7-22 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Actions for a Preloader Animation cut, paste, and clear frames as necessary insert a new layer use the drawing tools to create the preloader in frame 1 insert a keyframe and delete the drawn preloader

7-23 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Actions for a Preloader Animation…/2 This action will create a loop in which frames 1-11 will continually replay. insert a new layer insert a keyframe double-click goto

7-24 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Actions for a Preloader Animation…/3 This action will move the playhead to frame 12 when all of the frames have been downloaded. click if in frame 1 of the Actions layer double-click properties to add to text box -key spaces and equals signs double-click goto key frame number

7-25 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Actions for a Preloader Animation…/4 This action causes Flash to stop playing the main movie Timeline. click frame 12 in the Actions layer double-click

7-26 OBJ Copyright 2003, Paradigm Publishing Inc. Using Buttons to Toggle the Playing of a Soundtrack On and Off  A streamed soundtrack in a movie clip symbol can be the target action for start and stop sound buttons  provides the user with the ability to turn sound on or off during the movie playback  Requires ActionScript using the with statement

7-27 OBJ Copyright 2003, Paradigm Publishing Inc. With Statement targets a named instance of a movie clip stop playing the sound upon pressing and releasing the mouse over the button start playing the sound upon pressing and releasing the mouse over the button

7-28 OBJ Copyright 2003, Paradigm Publishing Inc. Using the getURL Action to Open a Web Page During a Movie  The URL parameter can be an absolute or relative address for a Web page or document  Window parameters:  _self:opens within the current window replacing the movie from which it originated  _blank: opens in a new browser window  _parent: opens in the browser in the parent of the current frame  _top: opens in the top-level frame of the current browser window

7-29 OBJ Copyright 2003, Paradigm Publishing Inc. Using the getURL Action to Open a Web Page During a Movie…/2 -publish the movie as HTML and as a projector file File, Publish Settings or Ctrl + Shift + F12 click

7-30 OBJ Copyright 2003, Paradigm Publishing Inc. Using the fscommand to Control the Player Window  Used to control the environment in the window hosting the movie  Commands for standalone player include fullscreen, allowscale, showmenu, trapallkeys, exec, and quit

7-31 OBJ Copyright 2003, Paradigm Publishing Inc. Creating a Template -saves time and ensures consistency -include standard elements such as a company logo, colors, and publishing options File, Save As Template key a name choose or add a category key a brief description of the standardized elements preview appears click Save

7-32 OBJ Copyright 2003, Paradigm Publishing Inc. Using a Template File, New From Template click category name click template name description is displayed click Create

7-33 OBJ Copyright 2003, Paradigm Publishing Inc. Using the Movie Explorer Panel -a tool with which you can locate or view objects in a movie in a hierarchical display Window, Movie Explorer or Alt + F3 Show Text Show Buttons, Movie Clips and Graphics Show Action Scripts Show Video, Sounds and Bitmaps Show Frames and Layers Customize which Items to Show Expand to view ActionScript statements

7-34 OBJ Copyright 2003, Paradigm Publishing Inc. Finding Information About Flash on the Web  Go to the Source  Macromedia maintains tech notes and tutorials on the Flash support center that provide articles on Flash features including step-by-step instructions   Flashkit.com Flash Developer Resource Site  a Web site for developers that includes several resources including forums and free downloads to assist with building Flash movies   Flash Magazine  a Web site maintained by volunteer Flash developers from around the world with articles and tutorials on using Flash 

7-35 OBJ Copyright 2003, Paradigm Publishing Inc. Commands Review How do you display the Actions panel? Window, Actions or F9

7-36 OBJ Copyright 2003, Paradigm Publishing Inc. Commands Review How do you display the Movie Explorer panel? Window, Movie Explorer or Alt + F3

7-37 OBJ Copyright 2003, Paradigm Publishing Inc. Commands Review How do you create a new document based on a template? File, New From Template

7-38 OBJ Copyright 2003, Paradigm Publishing Inc. Commands Review How do you display the Publish Settings dialog box? File, Publish Settings or Ctrl + Shift + F12

7-39 OBJ Copyright 2003, Paradigm Publishing Inc. Commands Review How do you save a document as a template? File, Save As Template

7-40 OBJ Copyright 2003, Paradigm Publishing Inc.