Nicht unterstützte sampling-flex/actionscript

In action script ich brauche

  Loading configuration file /opt/flex/frameworks/flex-config.xml
  t3.mxml(10): Error: unsupported sampling rate (24000Hz)

        [Embed(source="music.mp3")]

     t3.mxml(10): Error: Unable to transcode music.mp3.

        [Embed(source="music.mp3")]

Den code

         <?xml version="1.0"?>
   <!-- embed/EmbedSound.mxml -->
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

  <mx:Script>
    <![CDATA[

        import flash.media.*; 

        [Embed(source="sample.mp3")]
        [Bindable]
        public var sndCls:Class;

        public var snd:Sound = new sndCls() as Sound; 
        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>
InformationsquelleAutor Rajeev | 2011-01-14
Schreibe einen Kommentar