Untitled Document
Advertise on Tutorial4Me Home Page Submit Your Tutorial Home Page
Untitled Document
Tools
  Submit tutorial
Pending list
Highest rated tutorials
Most viewed tutorials
Advertise
Contact Us
 
    3d Studio Max
    Adobe Photoshop
    Macromedia Flash
    Adobe Illustrator
    Corel Draw
    PHP
    HTML
    CSS
    JavaScript
 
    0tutor.com
    Broderjakob.se
    Cartoonsolutions.com
    Tu-world.com
    Codecall.net
    Tech-faq.com
    Phptoys.com
    Partdigital.com
    Blizaga.com
    Techtut.com
    Abduzeedo.com
    Swfspot.com
    Combined-minds.net
    Originalflash.com
    Flashvault.net
    Webzo.org
    Oman3d.com

 

 

 

 

Untitled Document
 
 

 
   
Tutorials in base
1708
Pending tutorials
0
Categories
113

 

Untitled Document
 

 

Turn sound on or off

1. Open new document. I will set 100*100, you can chose what you want.

2. Type some text or make some button for stopping music. I'll put just sound on/off.

http://www.tu-world.com/flash/tutorials/02/01.jpg

3. Select text wich you insert and convert to Movie Clip (F8)

http://www.tu-world.com/flash/tutorials/02/02.jpg

 

4. Change instance name for converted text in to: control

http://www.tu-world.com/flash/tutorials/02/13.jpg

5. Double-click on converted item.

6. In 1st layer is your text (or button). Go and make new layer.

http://www.tu-world.com/flash/tutorials/02/03.jpg

7. In second layer you need to set up volume control. We'll do it with actionscript. You need to put keyframe in every frame of your 2nd layer. It must look like this (you need to have 13 ketframes at all):

http://www.tu-world.com/flash/tutorials/02/04.jpg

8. Now we need to open actionscript window for every single frame and set up volume. You can open actionscript window by selecting frame and pressing F9. Let's go to fill actionscript (I suggest to use copy/paste):

http://www.tu-world.com/flash/tutorials/02/05.jpg

 

frame 01


s = new Sound( );
s.attachSound("mysound");
s.setVolume(100);
s.start( 0 , 50000 );

 

Finish? Select next frame

 

frame 02


stop();

Finish? Select next frame

 

frame 03


s.setVolume(75);

Finish? Select next frame

 

frame 04


s.setVolume(50);

Finish? Select next frame

 

frame 05


s.setVolume(25);

Finish? Select next frame

 

frame 06


s.setVolume(0);

Finish? Select next frame

 

frame 07


stop();

Finish? Select next frame

 

frame 08


leave empty

Finish? Select next frame

 

frame 09


s.setVolume(25);

Finish? Select next frame

 

frame 10


s.setVolume(50);

Finish? Select next frame

 

frame 11


s.setVolume(75);

Finish? Select next frame

 

frame 12


s.setVolume(100);

Finish? Select next frame

 

frame 13


gotoAndStop(2);

Finish? You must have same situation like below

http://www.tu-world.com/flash/tutorials/02/12.jpg

 

9. OK, after this hard work we just need to set up button and everything is over. Select text (or button) from Layer 1 and convert it to button (F8).

http://www.tu-world.com/flash/tutorials/02/06.jpg


10. Click one on new button, and open actionscript window (F9). Write this code:

http://www.tu-world.com/flash/tutorials/02/07.jpg

code


on (release) {
if (getProperty ("/control", _currentframe )==2) {
tellTarget ("/control") {
gotoAndPlay(3);
}
} else if (getProperty ("/control", _currentframe )==7) {
tellTarget ("/control") {
gotoAndPlay(7);
}
}
}

 

11. We are almost done. Double-click on button. Select frame below HIT and press F6.

http://www.tu-world.com/flash/tutorials/02/08.jpg

12. Draw square around the text and after that back to root.

http://www.tu-world.com/flash/tutorials/02/09.jpghttp://www.tu-world.com/flash/tutorials/02/10.jpg

13. Last thing. On root you need to add some music. First, import music to stage (Ctrl+R), than select Layer 1 and just add music.

http://www.tu-world.com/flash/tutorials/02/11.jpg

14. OK, we are done and we have our perfect volume control.

15. Download final .fla file if you want - Flash tutorial #2

16. Search our big tutorial database (right now we have more than 1000 tutorials) on www.tutorial4me.com. Go to home page.

 


 

 

Untitled Document
 
 
 
  Create Text Shadows in CorelDraw - Create Text Shadows in CorelDraw  
Rating: | 864 Hits
 
  Video Tutorial on Creating 3D pipes - Video Tutorial on Creating 3D pipes in Illustrator  
Rating: | 1089 Hits
 
  Arrow - Learn how to create a 3D arrow with a reflection in Illustrator  
Rating: | 699 Hits
 
  Panoramas - With the technology there is today in digital photography, making huge pictures with digital stitching software is surpr  
Rating: | 220 Hits
 
 
  Bubble Menu - Here is the new menu of our Menu marathon. This one has bubbles. It's so easy, so try it.  
Rating: | 7274 Hits
 
  Rotating Menu - Perfect Navigation Menu for your new flash site. It's menu with rotating links. It's easier than you think...  
Rating: | 6967 Hits
 
  Tutorial: Display your images from MySQL using PHP - Display image stored in MySQL using PHP.  
Rating: | 5172 Hits
 
  Creation of captcha - Secure forms - Creating Captcha using secure forms.  
Rating: | 4960 Hits
 
 
 

  Tutorial Quest : Design and Coding Tutorial Directory

 
 
www.tu-world.com
 
Untitled Document
Tutorial4Me.com @ 2007 | Submit tutorial | Advertise | Contact Us |