Im making a cd rom with voice over prompts for stage elements. Id like the user to able to turn off the prompts if they so choose. Unfortunatly stopallsounds works for continuous audio so I think I need a solution that checks the current global volume and turns it to the oposite. ie, if the volume is on (100) the button then turns it to off (0) and vice versa. In this way the user can turn sound on and off.
Any help will be gratefully received.
(note this is AS2, please let me know if you need AS3 code)
Put this in the first frame of the main timeline, this should create a global sound variable.
var globalSound:Sound = new Sound();
Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.
This article is primarily concerned with ActionScript 3 and generally specific to AVM2. Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3.
With the advent of ActionS…
Sometimes you know that one object has a specific child in it, but you can't find the child.
This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons. My partner had created the toolbar usi…
Viewers will learn how to turn a Live Set into a compressed Live Pack file, and how to install Live Packs.
Make: File > Collect All And Save:
File > Manage Files:
Click Manage Project:
Click Create Pack:
Select save location: