不支持的flex / actionscript采样
我需要的动作脚本
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")] 代码是 <?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> 解决方法
从
livedocs开始:
Flex Builder不会为您执行此操作,因此您需要在使用之前手动将“music.mp3”文件下采样到22kHz. 编辑:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- sqlite – SpatiaLite v4.0.0 RecoverGeometryColumn违反了
- 如何在raspberry pi2上使用flash【转载】
- ruby-on-rails – Rails db:migrate:reset生成Errno :: E
- SQLite选择不排序的列的DISTINCT值
- swift – 无法使用AVVideoCompositionCoreAnimationTool在视
- xml – 在coldfusion中使用cfif
- ruby-on-rails – Rails – ActiveRecord – 在更改字段值时
- 代码猴子与童子军军规
- 二、转换成3NF的保持函数依赖的分解
- ruby – 在Cucumber中捕获Sinatra帮手