RollOver RollOut

 

The purpose is to show Transform Effect associated with RollOver, RollOut events.
We 'll use a pretty simple script.
I suppose you know well how to create objects, thus I will not insist on.

⇒ animation ⇐

At first, Download image and sound. . 

Cretaing Objects

1 - Set up a movie scene 640x480 (background color doesn't matter).
Choose a Frame Rate 35.
In tab Content, import engine.wav

2 - Insert image truck.jpg. (menu Insert / Image)

3 - You gonna create a very simple smoke over each exhaust pipe.
Click ellipse.
Draw an ellipse as shown, with a radial gradient color.
Name it fumee

transform  transform  shape

Creating Effects

In Timeline, set a Transform effect for fumee over 15 frames.

transform  cascade

Ellipse is 45 height.
0,0 being the center, we start at its bottom with a Y-scale equal to 0 and X-scale 10%.
Right after place Fade Out effect over 5 frames.
You have therefore used 20 frames for the whole.

Copy object

1 - Copy and paste the previous object to the mentioned position :

image

2 - Select the 2 objects then menu Modify / Grouping / Group as Sprite.
Name it Effet. You'd yield

outline

Script

In Outline, select Scene_1. Enter script

onLoad { Effet.stop(); }

In Outline, select the image, then enter the following script

When mouse is over image, a sound is played and sprite plays.
When mouse goes out, all is stopped.
Warning :
If another object owns an Over event, the previous effect 'll stop as soon as the mouse 'll be over that new object.
In fact, the mouse event is captured by the object.

 


Si vous aimez le site

 

Select a language if you need :


Page chargée en 0.009 sec.

Dernière Modification : Mer 25 Janvier 2017 8:56
Copyright © 1999-2017 Jean-Paul Molina Tous droits réservés.

to Google