Dear all, I'm a Flex newbie. I have tried Flex Builder 2 Sample for embed sounds. it should be like this :
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import flash.media.*; [Embed(source="mySound.mp3")] [Bindable] public var sndCls:Class; public var snd:SoundAsset = new sndCls() as SoundAsset; public var sndChannel:SoundChannel; public function playSound():void { sndChannel=snd.play(); } public function stopSound():void { sndChannel.stop(); } ]]> </mx:Script> <mx:HBox> <mx:Button label="play" click="playSound();"/> <mx:Button label="stop" click="stopSound();"/> </mx:HBox> </mx:Application> I think it would be run properly. But, when i run the code, there's an error founded. "unable to resolve 'mySound.mp3' for transcoding" I have tried another example for embed the sounds, but the error was same. always in the embed declaration. any one know, who to Embed the sounds in adobe flex ? i'm very appreciate for the help. thx Sutuy