Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-13-2012, 12:42 AM   #1
arpeejajo
Registered User
 
Join Date: Mar 2011
Location: Woodbridge, ON
Posts: 7
Default Volume Control

I've need to lower the volume of specific layers in flash. I've done some research but can only find ways to lower the volume of the entire video. How would I apply that to certain layers?
arpeejajo is offline   Reply With Quote
Old 04-13-2012, 12:48 AM   #2
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,835
Send a message via Skype™ to henke37
Default

The SWF file format does not have layers. It has depths, but audio is unaffected by that.

Either put the audio on a separate timeline or play it using scripting.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 is offline   Reply With Quote
Old 04-13-2012, 12:50 AM   #3
arpeejajo
Registered User
 
Join Date: Mar 2011
Location: Woodbridge, ON
Posts: 7
Default

I've never tried using a script to load music. If I do that, would the SWF still have the sound after I delete the file from my computer?

EDIT: I'm researching loading external files and to my surprise it's very easy.

Last edited by arpeejajo; 04-13-2012 at 01:13 AM.
arpeejajo is offline   Reply With Quote
Old 04-13-2012, 12:36 PM   #4
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,835
Send a message via Skype™ to henke37
Default

It depends on where you load the audio from. Scripting can play both embedded and external audio.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 is offline   Reply With Quote
Old 04-13-2012, 02:52 PM   #5
rynoe10
Registered User
 
Join Date: Apr 2012
Posts: 2
Default

ActionScript Code:
var cherry:Sound = new Cherry(); var cherryCHNL:SoundChannel = new SoundChannel(); cherryCHNL = cherrySND.play(0,1000); var cherryVolume:SoundTransform = cherryCHNL.soundTransform; wakaVolume.volume = .5; cherryCHNL.soundTransform = cherryVolume;

Cherry is any sound file in the library with class linkage.
Volume can be any number between 0-1.
rynoe10 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:36 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.