Text rollover gives image and sound


The goal is to show how to display an image and playing a sound when the mouse rolls over a text item.

To be aware of the result, go and see my blog.
(Wait during loading because of many animations in this page)


I suppose you know how to set up a new movie.
The following will concern an item in a list. Repeat for every item.
You 'll get illustration by images.

01 - Create a text. (for instance Release Bend )

02 - Then click Modify / Convert / Convert to MovieClip (was named Sprite in older releases)
Give it a name : Release_bend

03 - Right click the text Release bend inside movieclip Release_bend.
Convert to button.

04 - In Properties, toggle Has separate over state.

05 - Click the text in branch Over State. Change text color in Properties.

06 - Click Over State. Click Insert / Import Image.
elect an image file. Modify _x, _y, _xscale, _yscale in Transform if necessary.

07 - Click movieclip Release_bend.
Click Insert / Import Sound. Select a sound file.

08 - In Timeline, for the sound, set Place in frame 2. You should get something like :


09 - Click movieclip Release_bend, write the following script :
onFrame (1) { stop(); }

10 - Inside movieclip branch, click Button, write the following script :
on (rollOver) { gotoAndPlay(2); }

Finally, you should get :

arbre de création    outline

That's all for that item.
Go on with the other items. Cheer up !


Page chargée en 0.001 sec.

Dernière Modification : Jeu 12 Mai 2022 10:33
Copyright © 1999-2022 Jean-Paul Molina Tous droits réservés.


to Google