© Anselm SpoerriDigital Media Production Digital Media Production Digital Media Production Anselm Spoerri PhD (MIT) Rutgers University

Slides:



Advertisements
Similar presentations
INTRODUCTION TO ADOBE FLASH CS4
Advertisements

 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.
© Anselm Spoerri Lecture 7 Meaning –Guiding Principles for Term Project Mechanics –Interactivity Recap –Simple and Disjointed Rollovers and Image Map –Navigation.
Macromedia Flash MX 2004 – Design Professional and Interactivity WORKING WITH SYMBOLS.
© Anselm Spoerri Lecture 10 Flash –Recap –Key Components & Tools –Animating Bitmaps –How to modify Color and Transparency of Bitmap –Animating along Motion.
© Anselm Spoerri Lecture 11 Flash –Build Flash Website with Animated Navigation Structure –Decide on Overall Navigation Layout, Import Images & Organize.
© Anselm Spoerri Lecture 12 Flash –Done So Far and Build Upon It –Create Function –Create “Button” using ActionScript –Name Keyframes –Create “Disjointed.
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 5 Intermediate Level Course. Animation Basics Playhead In-Between Frames Keyframe Current Frame Number Framerate Current Time Frames.
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.
© Anselm SpoerriDigital Media Production Digital Media Production Digital Media Production Anselm Spoerri PhD (MIT) Rutgers University
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.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
Exercise : Animated Navigation Structure in Flash 1.Develop Answers to “What did you learn in ITI program?” “What do you have to offer?” “What are your.
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 II MIS439 Eva Tao March 19, 2007 Source:
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.
CT1514.  What is Motion Guide Layer?  Controls the movement of objects in a Motion tween animation  How to create a Motion Guide Layer?  Click on.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
© 2010 Delmar, Cengage Learning Chapter 3: Working with Symbols and Interactivity.
XP Tutorial 4 Special Animations. XP New Perspectives on Macromedia Flash MX Special Layers for Animation Animation Using a Motion Guide Layer.
Creating Buttons – Lesson 71 Creating Buttons Lesson 7.
Distributed Multimedia Programming Week - 1. Document Window  The Document Window is divided in to six main components Timeline – The Timeline is where.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
More Tips on Flash CSC361/661 Digital Media Spring 2007 Burg.
Chapter 16 Video. Importing Video Into Flash  Once you import video into Flash, you can control it using behaviors and very basic ActionScript, target.
2006 Adobe Systems Incorporated. All Rights Reserved. 1 INTRODUCTION TO ADOBE FLASH CS3.
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.
Flash CS 5 Interface BY NSCHEWCZYK | ©2012. MENU BAR A bar at the top of the window. It lists menu options including: File, Edit, View, Insert, Modify,
Distributed Multimedia Programming Week – 4A Buttons Movie Clips.
© Anselm Spoerri Lecture 10 – Related: Part 1 Flash –Build Flash Website with Animated Navigation Structure –Decide on Overall Navigation Layout, Import.
Building the Events Components– Lesson 111 Building the Events Components Lesson 11.
© Anselm Spoerri Lecture 7 Meaning –Guiding Principles for Term Project Mechanics –Interactivity Recap –Simple and Disjointed Rollovers and Image Map –Navigation.
Macromedia Flash 8 Revealed WORKING WITH SYMBOLS AND INTERACTIVITY.
Macromedia Flash Design Professional And Interactivity WORKING WITH SYMBOLS.
1 Actionscript for Flash by Dr SC Li. 2 Understanding more about instances Symbolsgraphics buttons Movie clips Instances (without names) No interaction.
Tutorial 3 Creating Animations. XP Objectives Learn the different elements of animation Create frames and layers Organize frames and layers using the.
Flash Develop Rich Internet Content and Applications –Design motion graphics or build data-driven applications Flash Document = “.fla” filename extension.
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.
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
Flash Concepts and Demos - Overview Recap Unit 2 –Buttons (Simple Text and Animated Button) –Gradient Tool –ActionScript (stop, getURL) –Embed Flash Movie.
XP Tutorial 3 Creating Animations. XP New Perspectives on Macromedia Flash MX Elements of Animation Layers are used to organize the content of.
Flash 1. Document Properties Set frame rate and dimensions of project Set frame rate and dimensions of project (default width=550 and height=400)
© Anselm Spoerri Lecture 7 Meaning –Guiding Principles for Term Project Mechanics –Interactivity Recap –Simple and Disjointed Rollovers and Image Map –Navigation.
© Anselm Spoerri Lecture 10 Flash –Recap –Key Concepts, Components & Tools –Demonstration –Buttons: Simple Text Button | Animated Button –Gradient Tool.
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.
 Movieclip symbols are reusable pieces of flash animation  consisting usually of one or more graphic/button symbols  thus they are flash movies within.
Flash Demonstration – Unit 3 Create Multi-Part Animation –Animate Images –Fade-in and Fade-out Text –Add Interactivity to Instance of MovieClip –Animated.
Prof. Anselm SpoerriMultimedia Production Rutgers Lecture 11 Flash –Build Flash Website with Animated Navigation Structure –Decide on Overall.
 Motion Tween allow us to move a shape on the stage from one place to another.  In order to use motion tween, the shape to be moved must be converted.
Adding Buttons, Actions, and Sounds
Macromedia Flash Tutorial
Flash Demonstration – Unit 5 – ActionScript 2.0
INTRODUCTION TO ADOBE FLASH CS4
Chapter Lessons Create shape-tweened animations Create a mask effect
Working with Symbols and Interactivity
Flash Concepts and Demos - Overview
Flash Demonstration – Unit 5
Flash Demonstration – Unit 5 – ActionScript 3.0
Exercise : Animated Navigation Structure in Animate (= Flash)
Exercise : Animated Navigation Structure in Flash
Presentation transcript:

© Anselm SpoerriDigital Media Production Digital Media Production Digital Media Production Anselm Spoerri PhD (MIT) Rutgers University

© Anselm SpoerriDigital Media Production Lecture 12 - Overview Flash –Flash Templates provided by Knight Digital Media Center –Quick Overview and How to Customize –Save Video as.flv to play inside Flash Template –Build Flash Website with Animated Navigation Structure –Decide on Overall Navigation Layout, Import Images & Organize Assets –Create Animations for Navigation Buttons –Create "UP" Buttons –Create "Down" Buttons –Make Button Instance Interactive –Create Scenes and Swap in “Down” Button –ActionScript 2.0 –Done So Far and Build Upon –Create Function –Create “Button” using ActionScript 2.0 –Name Keyframes –Create “Disjointed Rollover” using ActionScript 2.0 Lectures – Week 12 Content

© Anselm SpoerriDigital Media Production Flash Templates – Knight Digital Media Center Detailed Instructions provided for how to customize Create SAME Image Dimensions as in Template –Example: 107x193 for front navigation images Swap Your Images in place of template images –Double-click image in library –Click on “Import” to import your photo in its place –Click “Update” Edit Text in some case you need to edit it inside symbol Specify FLV Video to show –Specify contentPath in FLVPlayback instance

© Anselm SpoerriDigital Media Production Step 0 – Download files, Launch Flash, Create Document Download Files Launch Flash –Start > Macromedia > Flash Create Flash Document and Set its Properties –File > New –Modify > Document or use Property Inspector –Frame Rate = 12 Dimensions = 640 x 480 Background color = White 800 x 600 Using Grid, Rulers and Guides –Rulers View > Rulers –Guides –View > Guides > Show Guides

© Anselm SpoerriDigital Media Production Step 1 – Overall Navigation Layout and Organize Assets Decide on Overall Navigation Layout 1) Create layers for "background", "navigation", "stage"... 2) Create Guides for Navigation Text and Images Import Images for Navigation 1) Resize to fit allocated space (or "create to spec" in image editing program). 2) Convert images into Graphic Symbols. Organize Assets 1) Open "Library" window. 2) Click on "Folder" icon to create folders for "Images", "Buttons"...

© Anselm SpoerriDigital Media Production Step 2 – Create Animations for Navigation Buttons 1) Create "Movie" symbol using "Insert > New Symbol". 2) Drag "Graphic Symbol“ onto Stage of Animation (creates instance) 3) Add keyframes. 4) For each keyframe, apply effects (select instance on stage to apply Alpha effect). 5) Animate by applying "tweening" 6) Select last keyframe, open "Actions" window (can use Right-Click) and type "stop ();" (so that the animation does loop). Make sure "Frame" is selected by checking "Actions for..." the heading in top left corner.

© Anselm SpoerriDigital Media Production Step 3 – Create "UP" Buttons 1) Insert "Button" symbol. 2) Create layers and guides for text and animation. 3) "UP" state - create text (and possibly background shape) 4) "OVER" state - insert keyframe, modify text, add animation. 5) "DOWN state - insert (empty) keyframe, modify text and add static graphic by selecting animation and using "Swap" in the Property Inspector; want graphic to line up with end state of animation. 6) "HIT" state - define "hotspot" for button (in addition to shapes in other states).

© Anselm SpoerriDigital Media Production Step 4 – Create "Down" Buttons Use "Duplicate Symbol" to Create Buttons 1) Select "Button" symbol, Right-Click, select "Duplicate" and name it. 2) Replace text in the keyframes for the different states. 3) Use "Swap" to replace animation and position appropriately. Create "Down" Buttons 1) Use "Duplicate Symbol" to create "Down" button and name it. 2) Update states: "down" and "up" become identical (use "Copy Frames" and extra layer for swapping if needed). 3) "Over" should also contain static image as in "Up" state and the same text color as in "Up" state.

© Anselm SpoerriDigital Media Production Step 5 – Make Button Instance Interactive Open "Scene" Window 1) "Scene 1" - name it "Bilbao". Make Button Instance Interactive 1) Select instance of button in "Scene 1" and name it 2) Open "Action" window. 3) Press "+" and then select action to be triggered: Global Functions > Timeline Control 6) Select "gotoAndStop" and for scene select "Bilbao". Action associated with button is: on (release) { gotoAndStop ("Bilbao", 1); }

© Anselm SpoerriDigital Media Production Step 6 – Make Button Instance Interactive (cont.) Select ActionScript for "Bilbao" Button 1) Select instance of "Bilbao" button and open Actions Window 2) Select ActionScript and copy it Select Button Instance 1) Select instance of button (and name it). 2) Open "Action" window 3) Paste ActionScript. 4) Modify "gotoAndStop ("Bilbao", 1) so that another scene (to be created) is referenced, such as "Gehry", "Meret" or "Dance". Action associated with button is: on (release) { gotoAndStop ("SceneName", 1); }

© Anselm SpoerriDigital Media Production Step 7 – Create Scenes and Swap in “Down” Button Create "actions" Layer 1) Insert layer called "actions". 2) Select first keyframe and open "Actions" window. 3) Type "stop ();". Open "Scene" Window to Duplicate Scenes 1) Open "Scene" window. 2) Click the "Duplicate Scene" icon in the bottom right. 3) Name the duplicate consistent with scenes referenced in the ActionScripts associated with the different buttons. Insert "Down" Button for Each Scene 1) Select button related to selected scene. 2) Use "Swap" in Property Inspector and select "Down" button.

© Anselm SpoerriDigital Media Production Recap – How to create Animated & Interactive Button 4. Button UP = BUTTON Symbol OVER State 3. Animation = MOVIE Symbol 2. Bitmap Symbol = GRAPHIC Symbol 1.Import Bitmap To Change Alpha  Select Instance of Symbol Animation Stops  Add “stop ()” to last keyframe Navigation Select instance of Button and attach ActionScript Save Time  Use “Duplicate” and Modify

© Anselm SpoerriDigital Media Production Done So Far – Create Flash Website with Animated Buttons 1.Import Images 2.Convert Images to Graphic Symbols “Insert > Convert to Symbol” 3.Create Movie Clip using “Insert > New Symbol” 4.Insert Graphic Symbol and Animate 5.Create Buttons 6.Insert Movie Clip in “Over” State 7.Create “UP” and “DOWN” Buttons 8.Create Navigation Bar in “Scene 1” and add ActionScript 9.Create Scene for Each Category and “Swap In” “Down” Button  This Week – Create Secondary Navigation and “Disjointed Rollover” using ActionScript

© Anselm SpoerriDigital Media Production Attach ActionScript Frame  stop (); Function definitions Variables Button Movie Clip Actions panel allows you to select, drag and drop, rearrange, and delete actions Reference panel to view detailed descriptions of actions  Window > Reference Flash can detect what action you are entering and display code hint Scripts attached to a frame execute when playhead enters frame. –first frame in a movie is rendered incrementally Scripts attached to movie clips / buttons execute when event occurs

© Anselm SpoerriDigital Media Production ActionScript Terminology Objects are collections of properties and methods Methods are functions assigned to an object Instances are objects that belong to a certain class Instance names are unique names that allow you to target movie clip instances in scripts  Use Property inspector to assign instance names to instances on Stage.  “ this ” to movie clips Target Paths = Hierarchical Addresses movie clip instance names, variables, objects in movie –Use target path to direct action at a movie clip or to get or set variable value _root.stereoControl.volume

© Anselm SpoerriDigital Media Production Dot Syntax “.” Indicate the properties or methods related to an object or movie clip Used to identify target path to a movie clip, variable, function, or object movieClip._x movieClip._alpha movieClip._xscale movieClip._visible = true; _parent.movieClip.play ();

© Anselm SpoerriDigital Media Production Defining a Function // global _global.myFunction = function (x) { return (x*2)+3; } // local function sqr(x) { return x * x; }

© Anselm SpoerriDigital Media Production MovieClip – Event Handler Actions and Methods Event handler actionsEvent handler methods onClipEvent (load)onLoad onClipEvent (enterFrame)onEnterFrame onClipEvent (mouseDown)onMouseDown onClipEvent (mouseUp)onMouseUp onClipEvent (mouseMove)onMouseMove onClipEvent (keyDown)onKeyDown onClipEvent (keyUp)onKeyUp onPress onRelease onRollOver onRollOut

© Anselm SpoerriDigital Media Production Step 0 – Download files, Launch Flash, Create Document Download Files Launch Flash Open File “Step0.fla” Using Grid, Rulers and Guides –Rulers View > Rulers –Guides –View > Guides > Show Guides

© Anselm SpoerriDigital Media Production Step 1 – Create Global Function Insert Layer “functions” in first scene “Bilbao” to contain global functions Want to create function that changes transparency and scale of movie 1)Open Actions Window 2)Enter function definition _global.changeVisuals = function (movieClip, alpha, scale) { movieClip._alpha = alpha; movieClip._xscale = scale; movieClip._yscale = scale; }

© Anselm SpoerriDigital Media Production Step 2a – Create Secondary Navigation Buttons Using ActionScript 1) Create “Movie” Symbol = “Furcup Button” 2) Create Button Background and Text 3) Create Secondary Navigation Area in “Meret” Scene 4) Add instance of “Furcup Button” movie clip to “Meret” scene and name it “Furcup” 5) Select “Furcup” instance 6) Open Actions window

© Anselm SpoerriDigital Media Production Step 2b – Create Secondary Navigation Buttons Using ActionScript With “Furcup” movie clip instance selected, add in Actions Window onClipEvent (load) { var alphaOut = 50; var alphaOver = 75; var alphaPress = 100; var scaleOut = 100; var scaleOver = 110; var scalePress = scaleOver; // set transparency this._alpha = alphaOut; this.onRollOver = function () { trace ("Over"); changeVisuals (this, alphaOver, scaleOver); }

© Anselm SpoerriDigital Media Production Step 2c – Create Secondary Navigation Buttons Using ActionScript onClipEvent (load) { var alphaOut = 50; var alphaOver = 75; var alphaPress = 100; var scaleOut = 100; var scaleOver = 110; var scalePress = scaleOver; // set transparency this._alpha = alphaOut; this.onRollOver = function () { trace ("Over"); changeVisuals (this, alphaOver, scaleOver); } this.onRollOut = function () { trace ("Out"); changeVisuals (this, alphaOut, scaleOut); } this.onPress = function () { trace ("Press"); changeVisuals (this, alphaPress, scalePress); _parent.gotoAndStop("Furcup"); }

© Anselm SpoerriDigital Media Production Step 3a – Label Keyframe, Create “DOWN” Button 1) Create layer = “labelled” 2) Select frame = 20, Insert Keyframe and Name it “Furcup” 3) Add “stop ();” to “actions” layer at frame = 20 (need to add insert keyframe) 3) Insert Keyframe at frame = 20 in layer “furcup” 4) Select instance of movie clip and name it “FurcupDown”

© Anselm SpoerriDigital Media Production Step 3b – Modify attached ActionScript Modify ActionScript attached to “FurcupDown” instance var scalePress = 120; this._alpha = alphaPress; this._xscale = scaleOver; this._yscale = scaleOver; this.onRollOver = function () { trace ("Over"); changeVisuals (this, alphaPress, scaleOver); } this.onRollOut = function () { trace ("Out"); changeVisuals (this, alphaPress, scaleOut); } this.onPress = function () { trace ("Press"); changeVisuals (this, alphaPress, scalePress); _parent.gotoAndStop("Furcup"); }

© Anselm SpoerriDigital Media Production Step 4a – Create “Disjointed” Rollover Create “Furcup Animation” 1) Import “Furcup” image and convert to Graphic Symbol 2) Create new movie clip symbol called “Furcup Animation” 3) Create Animation (make sure image expands from origin of movie clip). 4) Add instance “Furcup Animation” to “Meret” scene at frame = “Furcup” 5) Name instance “FurcupImage” Create “Furcup Text" 1) Create new movie clip symbol called “Furcup Text” 2) Create Text 3) Add instance “Furcup Text” to “Meret” scene at frame = “Furcup” 5) Name instance “FurcupText”

© Anselm SpoerriDigital Media Production Step 4b – Create “Disjointed” Rollover Make “FurcupText” Invisible 1) Select “actions” layer at frame = 20 2) Add ActionScript FurcupText._visible = false;

© Anselm SpoerriDigital Media Production Step 4c – Create “Disjointed” Rollover Add “Disjointed Rollover” to “FurcupImage” Select “FurcupImage” instance and in Actions window onClipEvent (load) { this.onRollOver = function () { trace ("Over"); _parent.FurcupText._visible = true; } this.onRollOut = function () { trace ("Out"); _parent.FurcupText._visible = false; } this.onPress = function () { trace ("Press"); }