Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Video/MovieClip/MC/Movie Clip - FLV/SWF - sound/audio volume decreasing or increasing or mute or reduce code.
Over the Internet, I had searched a lot and found few articles that suggested me to add soundclips as an external object and then control or reduce it(volume/sound) but what if I have a video.swf or flv which contains sound/audio in my library or in the stage and I want to reduce or increase it's volume/sound.After , searching for 5 hours I was bored but finally found the solution and now I want to share it with everyone.
So no more talk , just read the code and you will have the idea how to do it.
Code:
//Suppose I have a movieclip/mc/movie clip named 'video' which contains audio and video entity
// we are writting as3/actionscript 3.0 coding , follow as below.
//Mute Volume/Sound
video.soundTransform = new SoundTransform(0); //maybe it won't work in AS2/ActionScript 2.0...works in as3
//Full Volume/Sound
video.soundTransform = new SoundTransform(1); //maybe it won't work in AS2/ActionScript 2.0...works in as3
//Half Volume/Sound
video.soundTransform = new SoundTransform(.5); //maybe it won't work in AS2/ActionScript 2.0...works in as3
SEO Tags:
thanks so much, this really helped :)
ReplyDelete