Animations Flash ActionScript Introduction to Thomas Lövgren

Slides:



Advertisements
Similar presentations
Flash Raining Text. Open Project Create Project – Action Script 3 Select Text Tool Type in some text – From the Properties Menu – Choose Font, Font Size,
Advertisements

Flash animation For beginners. Lesson objectives To understand how to animate a ball To understand how to loop animations To learn how to use animation.
CIS 205—Web Design & Development Flash Chapter 3 Appendix B on Creating Animations.
1 Flash Actionscript Animation. 2 Introduction to Sprites We will now look at implementing Sprites in Flash. We should know enough after this to create.
Macromedia Flash 5 Intermediate Level Course. Animation Basics Playhead In-Between Frames Keyframe Current Frame Number Framerate Current Time Frames.
1 Flash and Animation Presented by : Behzad Sajed Khosrowshahi.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
© 2010 Delmar, Cengage Learning Chapter 4: Creating Animation.
Roentgen photo effect. This detailed, thoroughly explained lesson will show you how to create very attractive roentgen photo effect. You can use this.
MovieClips & Properties Flash ActionScript Introduction to Thomas Lövgren
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Frame Part of timeline panel You can remove normal frames from a certain layer by (MRC + Remove Frames). You can remove normal frames from a certain layer.
Introduction to Flash FYS100 Creative Discovery in Digital Art Forms Spring 2007 Burg.
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.
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.
Chapter 4 Creating Animations.
Click your mouse for next slide Flash - Motion Tweening Creating a movie frame by frame would be very time consuming It would also be very jerky unless.
CDM105 Session 9 Macromedia FLASH MX 2004 Part 2 : Animation with Motion Tweening and Shape Tweening.
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.
Interface & navigation (How to build a simple presentation interface) Flash ActionScript Introduction to Thomas Lövgren
Copyright © 2003 Pearson Education, Inc. Chapter 3, Slide 1 by Michael Kay The Web Wizard’s Guide to Flash.
® Copyright 2008 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH CS3.
XP Tutorial 4 Special Animations. XP New Perspectives on Macromedia Flash MX Special Layers for Animation Animation Using a Motion Guide Layer.
DIAMOND SHINE EFFECT. IN THIS STEP BY STEP LESSON, I WILL SHOW YOU HOW TO CREATE VERY ATTRACTIVE DIAMOND SHINE EFFECT USING SOME SPECIAL FLASH TIPS AND.
EYEGLASSES SHINE EFFECT. IN THIS LESSON, YOU WILL SEE HOW TO APPLY SHINE EFFECT ON EYEGLASSES ON THE PICTURE USING THE COLOR MIXER PANEL AND MASK.
Creating Buttons – Lesson 71 Creating Buttons Lesson 7.
Adobe Flash CS3 Revealed
Agenda – Week 8, Day 2 Tuesday Intro to Flash Animation process Computer animation Lesson 1 – Overview Lesson 2 – Drawing Lesson 4 – Layers Lesson 8 –
© 2011 Delmar, Cengage Learning Chapter 4 Creating Animations.
Chapter 4 Creating Animations. Chapter 4 Lessons 1.Create motion tween animations 2.Create classic tween animations 3.Create frame-by-frame animations.
1. Press the New Layer Button 3. Double click names to re-name Ball & Shadow layers 2. Click to change to 12 fps Step 1.
2006 Adobe Systems Incorporated. All Rights Reserved. 1 INTRODUCTION TO ADOBE FLASH CS3.
Motion Tweening – Lesson 81 Motion Tweening Lesson 8.
5-1 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Sound, Video, and Basic Interactivity with Buttons Macromedia Flash Design & Application.
1 Flash Basics Exercise Guide Making Animated Text  1.1 Open Flash 5.0 working environment frame 1  1.2 Highlight frame 1 of the first layer Insert.
BASIC MOTION TWEEN Studio 8 1. Draw a square (blue fill, no stroke) on the upper-left area of the stage.
Distributed Multimedia Programming Week - 3 Shape Tweening Symbols and Instances.
Tutorial 3 Creating Animations. XP Objectives Learn the different elements of animation Create frames and layers Organize frames and layers using the.
Chapter2 Create animation. Objectives Import image Use the blank keyframe Add sound Publish the movie as an SWF file Use a motion tween animation.
Flash animation For beginners. homework Your homework is over two weeks so please write in each week of your planner for the next two weeks For homework.
FLASH!!!!!!!!!!!!!!!!!!!!!!!!! A TUTORIAL BY BRITTANY HESS AND MARGARET DENTON.
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.
Click your mouse for next slide Flash – Fades and Alphas One useful thing you can so is to do a fade in of a picture or an image This is done by controlling.
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.
Animation in flash. Frame-by-Frame Animation An animation is made from a series of framed images displayed one after the other to create the motion. Flash.
 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.
Adobe Flash Professional CS5 – Illustrated Unit D: Creating Animation.
Flash Slideshow with Fade Transition Slideshow #1-Themed Images Slideshow #2-Instructional Images.
 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.
To play, start slide show and click on circle Lesson 3 Lesson 3 Lesson 3 Lesson 4 Lesson Lesson 4.
Creating a movie clip.
Tutorial 3 Creating Animations.
GIF or Not GIF? Use GIF for animation:
Macromedia Flash Tutorial
The Basics of Creating a Simple Flash Animation
CT1514 Flash-2.
INTRODUCTION TO ADOBE FLASH CS4
Animate Workspace. Objective % Utilize appropriate tools and methods to produce digital animation.
Flash animation For beginners.
Animate Some more advanced concepts
Motion Path Mouse Maze 1. Right-click & Copy the Maze from this slide.
Flash Concepts and Demos - Overview
Tweening along a path.
Let Flash do Guessing at Animation for you.
GIF or Not GIF? Use GIF for animation:
ANIMATE WORKSPACE Stage Timeline Properties Panel Library Panel
Presentation transcript:

Animations Flash ActionScript Introduction to Thomas Lövgren

Animations Where do we use Flash animations? Any system with some kind of movement (ex. video) Any system with some kind of movement (ex. video) Online Games and Online Games and Prototypes for Real games Prototypes for Real games Prototypes for developers Prototypes for developers Estimate time Estimate time Demonstrations for movement Demonstrations for movement Motion Motion Bending Bending Twist Twist Transition Transition Bounce Bounce and more… and more…

Animations Two general ways of animating Two general ways of animating 1. Traditional: Timeline – based 2. ActionScript – based Examples of animation usage: Examples of animation usage: Motion, Shape, slide, scale, motion guide, random movement, rotation, fade, colors etc. (3D animations: Animate in 3D software then export to flash)

Motion (1/3) Example of how to create a simple motion Example of how to create a simple motion timeline-based animation 1. Insert a new symbol 2. Choose movieClip and give it a name 3. Click OK and draw the object

Motion (2/3) 1. Go back to Main stage 2. Open the Library 3. Drag the movieClip from the Library to stage (left position) 4. Go up to timeline and choose insert keyframe at With the pointer at frame 15, now move the movieClip to the right 6. Click on the area between your start- and endframe, then choose Create Motion Tween

Motion (3/3) 7. Now the area between the start- and endframe will turn blue 8. Export your movie: Press Ctrl + Enter 9. Vìola, we got a motion tween! Questions: What happens if we put our endframe at 50? Chaning the movie framerate to 30? Easing in?

Animations timeline-based Shape tweening: Shape tweening: 1. Draw a shape on stage at frame 1 on the timeline 2. Insert a keyframe at Draw a different shape on stage at this timeline-position 4. Right click and choose Shape Tween in the Properties Panel 5. Export the movie Motion guide: Motion guide: 1. Make a traditional Motion animation (200 frames) 2. Right click on the ”Layer” (right of the timeline) 3. Choose ”Add Motion Guide” 4. Take the Pencil and draw a path 5. Put the pointer at the last frame in the timeline 6. Drag the movieClip and place it at the end of the guide 7. Export the movie

Animations with ActionScript Create a constant loop that handles the animation Create a constant loop that handles the animation The animation performs within the time-interval: The animation performs within the time-interval: 1/movie framerate Tip: Write/collect the code in an ”Action frame” Tip: Write/collect the code in an ”Action frame” //loop this.onEnterFrame = function(){ do someting… } Ex

Animation (AS) Animate a body (movieClip), x-position, rotation & alpha Animate a body (movieClip), x-position, rotation & alpha //create a loop for animation this.onEnterFrame = function(){ body_mc._x += 5; //move right body_mc._rotation += 5; //rotate body_mc._alpha -= 1; //decrease transparency } Ex

Motion (AS) Example: Start & stop motion with friction Example: Start & stop motion with friction Two buttons and a body (movieClip) //loop this.onEnterFrame = function(){ if(startMotion){ body_mc._x += speed; //speed = 15 } if(decrease){ body_mc._x += speed; speed = speed * friction; //friction = 0.96 } Ex

Arrow Keys & Movement (AS) Animation with keyboard control (Arrow keys) Animation with keyboard control (Arrow keys) var speed:Number = 12; this.onEnterFrame = function(){ //loop //right arrow key if(Key.isDown(Key.RIGHT)){ ship_mc._x += speed; ship_mc._rotation = 0; } //left arrow key if(Key.isDown(Key.LEFT)){ ship_mc._x -= speed; //direction ship_mc._rotation = -180; //rotate } Ex

setInterval (AS) The setInterval function could be used for animations The setInterval function could be used for animations An interval identifier that you can pass to clearInterval to cancel the interval An interval identifier that you can pass to clearInterval to cancel the interval Interval: The time in milliseconds between calls to the function Interval: The time in milliseconds between calls to the function arg1, arg2,..., argn Optional parameters passed to the function arg1, arg2,..., argn Optional parameters passed to the function setInterval(function, interval [, arg1, arg2,..] ) Example intervallID = setInterval(myFunction, 2000); //time in milli-seconds Ex

Random Movement (AS) Example of a Random movement animation with setInterval Example of a Random movement animation with setInterval //setInterval for time-interval call of a function //function name, interval, parameters intervallID = setInterval(moveClip, 2000); //time in milli-seconds //function for moving the clip function moveClip(){ //get new random values newPosX = random(300) + 50; newPosY = random(300) + 65; speed = random(20) + 8; more code here… Ex

Elasticity (AS) The basics of how to create an ” elastic animation” The basics of how to create an ” elastic animation” if(!dragging){ //on release speedX += (startX - ball_mc._x) * tension; //tension = 0.09 speedX += (startX - ball_mc._x) * tension; //tension = 0.09 speedY += (startY - ball_mc._y) * tension; speedY += (startY - ball_mc._y) * tension; speedX *= friction; //friction = 0.9 speedX *= friction; //friction = 0.9 speedY *= friction; speedY *= friction; ball_mc._x += speedX; //new position ball_mc._x += speedX; //new position ball_mc._y += speedY; ball_mc._y += speedY;} Ex

Bounce with gravity (AS) The basics of how to create a bouncing ball ball with a gravity constant The basics of how to create a bouncing ball ball with a gravity constant //apply gravity to vertical plain speed.y += gravity; if(!dragging){ //on release //add speed pos.x += speed.x; pos.y += speed.y; //check the bounds and change the //direction of the mc if(pos.y > bounds.bottom) { pos.y = bounds.bottom; speed.y *= -restitution; speed.x *= friction; } More code here… Ex

Dynamic Bubbles (AS) Example of how to create and animate some dynamic bubbles Example of how to create and animate some dynamic bubbles function createBubble() { clearInterval(intID); intID = setInterval(createBubble, random(140) + 15); bubble = new Object(); bubble = bubble_mc.duplicateMovieClip("bub" + i, i); bubble.yMove = random(20) + 2; i++; bubble.onEnterFrame = function() { this._y -= this.yMove; more code here... Ex