473,395 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,395 developers and data experts.

A Simple Motion Tween Example

joedeene
583 512MB
Hello all,

I am using Macromedia Flash Professional 8 in this example of a simple way to use motion tweens. Ok here goes...

Directions:

A. Preparation
1.) Start the Flash program. Once loaded, create a new Flash Document. Note: By default the pixels are set to 550 x 400, i changed mine to 275 x 200.

2.) Speed up the animation by changing the frame rate to 36 fps.

*An image to show where you should be at (not in full-screen).




B. Drawing The Object/Adding Frames

1.) Change the background color to black, #000000.

2.) Select the Oval Tool, or click 'O' on the keyboard, and draw a circle, while holding SHIFT AND ALT down (holding these keys just make it a perfectly round circle). Try and make the circle around 100 by 100.

3.) Double click the circle and a screen like the one below should replace the previous one (NOTE: You see the circle that should have been drawn, and also the yellow highlighted regions (4 of them), which i will use next.



4.) If your circle wasn't perfectly round, well in the highlighted regions on the above, change the values of the first column, W and H, to 100 and set the values of the X and Y to 0. (NOTE: Your circle should have moved to the top-left corner of the drawing field.)

5.) Click on frame 50 and press F6 on your keyboard, this will create a keyframe with the exact object(s) of the previous one(in our case 1). Here's an image to show you where you should be at selecting frame 50, then pressing F6.



And then here's an image of what the project window should look like after pressing F6.



C. Creating the Motion Tween

1.) Select frames 1-50, by clicking only ONCE on frame one and dragging to the right until you reach frame 50 (it should be highlighted in black like below).



2.) Right-click the selected frames and select "Create Motion Tween".

3.) Now click off of the selected items, and click frame 50 alone by clicking on it once, just frame 50. Move the circle so that its location, or X and Y, is 175 by 100.

4.) Click CTRL + ENTER and you should see your circle moving in a diagnal line and keep repeating once the frames are through. NOTE: to stop the repeat(optional, not necessary), use a simple actionscript code such as "Stop();" for frame 50. Image below shows actionscript for frame 50.



NOTE: Make sure in your actionscript window it says layer 1: 50, because 50 is the frame on layer 1 in which you are coding the stop() to stop the repeat.


well, this is my first article, i probably made some errors but please leave some feedback/comments/questions, Good Luck! :D

joedeene
Oct 4 '08 #1
1 7398
Markus
6,050 Expert 4TB
Just a note: you don't have to select all the frames and then right click to get the motion tween. You can simply right click on any frame between your keyframes and then hit Create Motion Tween.

Also, images don't appear for me. :(
Dec 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: web02 | last post by:
Hi y'all, I haven't had to program using many graphics, so . . . I want to do something for fun and I have to animate some simple shapes. I need some insight to perform this simple task to...
1
by: Anonymous via the Cypherpunks Tonga Remailer | last post by:
Hi, I'm building a simple Object Oriented CMS using PHP5 and the new object model (new to both). I'm looking for some design advice on how best to integrate the database class - which creates...
7
by: libsfan01 | last post by:
hi guys is there an extension for scriptaculous (or another library) that allows you to create more organic/natural looking movement? for example when an image slides across the screen, it...
1
by: untitled | last post by:
i wrote an application in c++ that capture a motion from a bmp sequence and outputs a 3DS max secript file contains the motions keys. i have two points here need to be fixed: 1- it is an offline...
1
by: czi02 | last post by:
Hi there;;;; how to animate a flash bounced ball?? ive draw a circle on oval tool the draw I click the frame1 then copy it on the 2nd and 3rd frame and paste frame. Ive click the 2nd frame...
0
by: evo27 | last post by:
hi guys. I'm trying to make a navigation menu with AS tweening. So far I have all 4 buttons and a graphic inside a movie clip named "logo_mc" with an instance name of "logo_mc". I have managed...
1
by: lennyc | last post by:
I would like to make a simple auto scroll of images with little user interactioin. It would be images moving horizontally in a continuous loop that stops on mouse over and starts up again on mouse...
1
by: valy | last post by:
hi guys, do y'all have any idea about writing a function to calculate the amount of white pixels on a difference image, and if the white amount is >= the threshold value then the image is count as...
3
by: Gozil | last post by:
Hey, Is there some javascript framwork that will let me center an image (with a tween) and at the same time give me a glow effect? Examples: http://www.apple.com/trailers/sony_p.../angelsdemons/...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.