Difference between revisions of "Flash Sound and Volume part 2"

esse quam videri
Jump to: navigation, search
Line 1: Line 1:
 
[[Categeory:Sound for Interaction]]
 
[[Categeory:Sound for Interaction]]
 
==Make a button to play a sound==
 
==Make a button to play a sound==
[[Editing Flash Sound and Volume]]
 
 
Draw something for the play button
 
Draw something for the play button
  

Revision as of 03:31, 28 May 2007

Categeory:Sound for Interaction

Make a button to play a sound

Draw something for the play button

FlashVol DrawPlay.png

Select the play button. Use the Solid Black arrow.

Convert the selection to a symbol (right click or Modify/Convert ot Symbol or f8). Select button and export for action script. Name the button btnPlay

FlashVol DrawPlayConvertToSymbol.png

FlashVol DrawPlayConvertToSymbolName.png

Name the instance. Go down to the properties section and name the instance of the button 'btnPlay'

FlashVol DrawPlayConvertToSymbolNameInstance.png

Click back on the first frame.

FlashVol ClickOnFrame1.png

Copy the following code to the script for frame 1

<csharp> btnPlay.onRelease = function() {

   //Play the sound 1000 times
   mySound.start(0,1000); 

}; </csharp>

Save the file and press ctr+enter to test the movie you should now have a botton that start the sound.


Draw a stop button

use the steps above to convert it to a button