Parag’s Den

Dedicated to my adored friends…..

Archive for the ‘– Flash’ Category

Flash is a tool for creating interactive and animated Web sites! Here we will learn how to start using Flash in our applications.

Flash Tweening

Posted by paragdongre on February 5, 2009

Tweening comes from the words “in between”.
With Tweening you can go from one keyframe to another and specify changes in the animation and let the Flash program create the frames in between.

Example

In this example we will learn how to make an object move across the screen.

<html><body>
<object width=”400″ height=”400″>
<param name=”movie” value=”ball.swf”>
<embed src=”ball.swf” width=”400″ height=”400″></embed>
</object>
</body></html>

Step 1
Create a small circle to the left in the Stage area. Do this by selecting the circle tool from the left toolbar. Draw the circle in the Stage area.
Step 2
Select the Arrow tool from the left toolbar. Double-click on the circle to select it.
Step 3
Now we have to convert the circle to a symbol. When the circle is converted to a symbol we can create instances of the circle. From the top menu choose Modify > Convert to Symbol. Name the symbol “Ball”, and select OK.
Step 4
Go to Frame 10 in the Timeline. Do this by clicking the gray field below 10. Then right click in this field. Choose Insert Keyframe. Keyframes appear as circles in a frame. This operation duplicates the image.
Note: A keyframe specifies changes in an animation. You create keyframes at important points in the Timeline and let Flash create the frames in between.
Step 5
Select the circle and move it to the right a couple of inches.
Step 6
Click on the Timeline any place between Frame 1 and Frame 10. Then right click and choose Create Motion Tween.
Step 7
Choose Control > Test Movie from the top menu to test your Flash movie.

    Flash Guide Tweening

With Motion Guide Tweening you can move an object from one location to another along a specified path.

Example
In this example you will learn how to draw a path an object should follow.

<html><body>
<object width=”400″ height=”400″>
<param name=”movie” value=”man.swf”>
<embed src=”man.swf” width=”400″ height=”400″></embed>
</object>
</body></html>

 

Step 1
Choose Window > Common Libraries > Graphics. Select the image you want to use. In this example we have used a Man.
Step 2
Click on the image and drag it outside the left edge of the Stage
Step 3
Go to Frame 40 in the Timeline. Do this by clicking the gray field below 40. Then right click in this field. Choose Insert Keyframe. Keyframes appear as circles in a frame. This operation duplicates the image.
Step 4
Click on the Timeline any place between Frame 1 and Frame 40. Then right click and choose Create Motion Tween.
Step 5
Right click on Layer 1 (Click on the layer name, where it says “Layer 1”). Choose Add Motion Guide in the pop-up menu. The Flash program will now insert a motion guide layer on top of layer 1. Motion guide layers are used to draw lines an animated symbol should follow.
Step 6
Click on the Motion Guide Layer to make sure it is the active layer (Click on the layer name, where it says “Guide: Layer 1”).
Step 7
Click on the Pencil tool in the left toolbox. Set the Pencil Mode to Smooth (in the Options section of the left toolbox).
Step 8
Draw a line. Begin on the image and draw a line to the other side of the Stage.
Step 9
Go back to Frame 1 in the Timeline. Click on the Arrow tool in the left toolbox. Select the “Snap to Objects” button in the Options section of the left toolbox.
Step 10
Place the image with its center on the beginning of the motion guide (the black line you have drawn with the Pencil). The center of the image shows as a +. A black circle appears when the image is snapped to the motion guide. Release the mouse button when the image is snapped to the guide.
Step 11
Go to Frame 40. Place the image with its center on the end of the motion guide.
Step 12
Choose Control > Test Movie from the top menu to test your Flash movie.

Is your Flash Movie Playing too Fast?

You can control this by selecting Modify > Movie from the top menu. A Movie Properties box will show. The Frame Rate field sets how many frames to display per second. Adjust the number to a lower number, and test your movie again.

 

    Flash Tint Tweening

With Tint Tweening you can change the color of an object.

Example
In this example you will learn how to change the color of an object.

<html><body>
<object width=”400″ height=”400″>
<param name=”movie” value=”changecolor.swf”>
<embed src=”changecolor.swf” width=”400″ height=”400″></embed>
</object>
</body></html>

Step 1
Choose Insert > New Symbol.
Note: To add Tint effects the object must be a symbol.
Step 2
Name the symbol “changecolor ” and select the Graphic option in Behavior. Click OK.
Note: You will now be taken to the symbol generator in the Flash program. Here you create symbols. Symbols can be dragged to the stage of your movie after you have created them. Step 3
Choose the Text tool in the left toolbox. Choose Text > Size > 36 from the top menu to make the text big. Choose Text > Style > Bold to make the text thick.
Step 4
Click in the work area and write “Demo: Color Changing Text”.
Step 5
Jump back to the movie. Do this by choosing Edit > Edit Movie.
Step 6
Insert the symbol you just created into the movie. Choose Window > Library. Select the “changecolor” symbol and drag it into the middle of the Stage.
Step 7
Insert a keyframe in Frame 15 and in Frame 30.
Step 8
Go to Frame 15. Right click on the text in the Stage. In the pop-up menu, choose Panels > Effect.
Step 9
Choose Tint from the drop down menu. A color map will show. Set the colors to: R=0, G=255, B=0.
Step 10
Click on the Timeline any place between Frame 1 and Frame 15. Then right click and choose Create Motion Tween.
Step 11
Click on the Timeline any place between Frame 15 and Frame 30. Then right click and choose Create Motion Tween.
Step 12
Choose Control > Test Movie from the top menu to test your Flash movie.

    Flash Shape Tweening

With Shape Tweening you can change one object into another.

Example
In this example you will learn how to change one object into another.

<html><body>
<object width=”400″ height=”400″>
<param name=”movie” value=”helloworld.swf”>
<embed src=”helloworld.swf” width=”400″ height=”400″></embed>
</object>
</body></html>

Step 1
Choose the Text tool in the left toolbox. Choose Text > Size > 48 from the top menu to make the text big. Choose Text > Style > Bold to make the text thick.
Step 2
Click in the work area and write “Learning”.
Step 3
Right click on the text you just wrote and choose Panels > Align from the pop-up menu.
Step 4
In the Align box select the “To Stage” button first. Then click on the “Align Horizontal Center” button and the “Align Vertical Center” button. Close the Align box.
Step 5
Select the Arrow Tool and click on the text. Choose Modify > Break Apart from the top menu.
Step 6
Insert keyframes at Frame 24, 50 and 51.
Step 7
Delete the text “Learning” in Frame 24. Select it and press the Delete button on your keyboard.
Step 8
Write a new text on the Stage. Write “Flash!” (Font size: 48, style: bold).
Step 9
Right click on the text you just wrote and choose Panels > Align from the pop-up menu. In the Align box select the “To Stage” button first. Then click on the “Align Horizontal Center” button and the “Align Vertical Center” button. Close the Align box.
Step 10
Select the Arrow Tool and click on the text. Choose Modify > Break Apart from the top menu.
Step 11
Insert a keyframe in Frame 26.
Step 12
Double click the keyframe in Frame 1. In the small pop-up box click on the Frame tab. Set Tweening to Shape. Close the pop-up box.
Step 13
Double click the keyframe in Frame 26. In the small pop-up box click on the Frame tab. Set Tweening to Shape. Close the pop-up box.
Step 14
Double click the keyframe in Frame 51. In the large pop-up box click on the Frame Actions tab. Click on the + sign. Choose Basic Actions > Go To. Close the pop-up boxes.
Step 15
Choose Control > Test Movie from the top menu to test your Flash movie.

Advertisements

Posted in - Flash | Leave a Comment »

Introduction to Flash

Posted by paragdongre on February 5, 2009

Flash is a tool for creating interactive and animated Web sites.

What you should already know ?
Before you continue you should have a basic understanding of the following:
• WWW, HTML and the basics of building Web pages

What is Flash?
• Flash is a multimedia graphics program specially for use on the Web
• Flash enables you to create interactive “movies” on the Web
• Flash uses vector graphics, which means that the graphics can be scaled to any size without losing clarity/quality
• Flash does not require programming skills and is easy to learn

Who can View Flash?
In September 2000, NPD Research, the parent company of MediaMetrix, conducted a study to determine what percentage of Web browsers have Flash preinstalled. The results show that 96.4% of Web users can experience Macromedia Flash content without having to download and install a player.
If you do not have the Shockwave Player installed you can download it for free from Adobe’s site.

Who can Create Flash Movies?
To create your own Flash movies you need to buy a Flash program.
The latest version from Adobe is Adobe Flash Lite (or Flash CS3 Pro).
If you do not have a Flash program, you can download a 30 days free trial version of Flash from Adobe.

Where to Start?
After you have installed Flash, you should go through the lessons that are included in the program. Start Adobe Flash, click Help in the menu and choose Lessons. These lessons will teach you the basics of Flash.

Flash Embedded in HTML

After creating a Flash movie you choose File > Save As from the top menu to save your movie. Save the file as “filename.fla”.

To embed the Flash movie you just made into an HTML page, you should go back to your Flash program and do the following steps:
Step 1
Choose File > Open. Open a Flash movie you have created.
Step 2
Choose File > Export Movie.
Step 3
Name the file “filename.swf”. Choose the location where the file is to be stored (in your Web folder). Click OK.
Step 4
Open the HTML page where you want to insert your Flash movie. Insert this code:

Note: This is the minimum code you need to embed a Flash movie in a browser. A broken icon will appear on the Web page if the user does not have the Flash plug-in installed.

Note: In the code above there is both an tag and an tag. This is because the tag is recognized by Internet Explorer, and Netscape recognizes the tag and ignores the tag.
Step 5
Type in the address of the HTML file in your browser and look at your first Flash movie.

Let the Flash Program do the Work
The code above is the absolute minimum code to embed Flash movies in HTML pages. It is not recommended to use the minimum code.
There should be a few more attributes added:
• classid is an attribute to the tag. It tells Internet Explorer to load the ActiveX plug-in if it is not installed
• pluginspage is an attribute to the tag. It displays a link to the Shockwave download page if Netscape does not have it
The Flash program can add these attributes for you:
Step 1
Choose File > Publish. Flash will now create the , , and tags for you. It will also create the classid and pluginspage attributes.
Step 2
Open the HTML document that Flash created, view the HTML source and copy the code into your HTML page where you want your Flash movie.
Step 3
Be sure that you have the “filename.swf” in your Web folder.
Step 4
Type in the address of the HTML file in your browser and look at your first Flash movie.

Posted in - Flash | Leave a Comment »