Adding Sounds to A Symbol
Flash Tutorials – Car Project - How To Install a Horn in Your Car
(I am working on a link to the resources for this short tute)
1. Import the “horn.wav” file to the library
2. Rename it just “horn”
3. Right-click on it and select “Export to Actionscript” and name the linkage “horn”
4. Select the car body on the stage
5. Press F9 to access the Actionscript pane.
6. Insert the following Actionscript:
on (keyPress "
carSound = new Sound(this);
carSound.attachSound("horn");
carSound.start();
}
7. Now when you run the movie and press the space bar, you should hear the horn.

0 Comments:
Post a Comment
<< Home