header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
MCE
Points:10
Posts:0

3/6/2011 3:13:11 PM

Title: Question re: Audio fade in and fade out in flash. How to tutorial and example


Thank you for your excellent example.

I see that in the Flex mx:SoundEffect class there is a "loop" property with which I can control the number of times the mx:SoundEffect plays.

For example:

loops="0"

plays the SoundEffect once.

How can I achieve the same effect of playing the sound _ONLY_ once, as in your example

//play music
function btnPlayClick(evt:Event):void {
channel=snd.play(0,20);
}


many thanks!



1
Rayan
Points: 700
Posts:0
3/8/2011 9:47:11 AM



use value 0 instead of 20. It defines the number of times sound should play.

channel=snd.play(0,0);

2
MCE
Points: 10
Posts:0
3/8/2011 2:24:12 PM



Rayan - thanks!

MCE


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 7+2 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions