MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 101

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Repeat step 6 for the other buttons (red, green, and black) to change the color of the movie clip
7
to the corresponding color. Your code should now look like this:
myColor = new Color(_root.carColor)
_root.blue.onRelease = function(){
myColor.setRGB(0x0000ff)
}
_root.red.onRelease = function(){
myColor.setRGB(0xff0000)
}
_root.green.onRelease = function(){
myColor.setRGB(0x00ff00)
}
_root.black.onRelease = function(){
myColor.setRGB(0x000000)
}
Select Control > Test Movie to change the color of the movie clip.
8
For more information about the methods of the Color class, see the
Chapter 12, "ActionScript Dictionary," on page
Creating sound controls
You use the built-in Sound class to control sounds in a SWF file. To use the methods of the
Sound class, you must first create a Sound object. Then you can use the
to insert a sound from the library into a SWF file while the SWF file is running.
When the user releases the Play button, a song plays through the speaker.
Color class
205.
Creating interactivity and visual effects
entry in
method
attachSound()
101

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents