Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controling sound file on stage...

Status
Not open for further replies.

michanagel

Technical User
Jun 23, 2007
34
US
Hi,

I've placed a soundfile on the stage in my timeline and set it to 'loop'.

I wanna control this soundfile via actionscript (setting the volume to '0' or '100' via the 'if' statement if certain parameters are met).

How can I assign an instance_name or variable for that soundfile ?

I gave it the linkage 'sound_main' but I can't control it with that...

I don't wanna work with the 'attachsound' method - I like to see my stuff on the stage...

Thanx for your help in advance !

Mike
 
oldnewbie,

I only wanna control one specific sound file, and not affect the other sounds on the timeline...

Thanx for your help !

Mike
 
Stick it in a movie clip, and control it in the same manner...

mySound = new Sound(music_mc);
mySound.setVolume(10);

Or you can set your sound in an external .swf, and load it up either in a container clip, or on a level, and reference the soundObject to either the container clip or the level...


Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top