Forked from: makc3d's Nectarine (demoscene radio) diff:16 FIXME: Google TTS makc3d forked:0favorite:0lines:16license : MIT License modified : 2009-12-29 02:56:42 Embed Tweet <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="465" height="465"> <mx:Script> <![CDATA[ import flash.media.Sound; import flash.net.URLRequest; public function play ():void { var url:String = "http://translate.google.com/translate_tts?q=\"" + escape (txt.text) + "\""; // why doesn't it work? (new Sound (new URLRequest (url))).play (); } ]]> </mx:Script> <mx:TextInput id="txt" x="10" y="10"/> <mx:Button x="180" y="11" label="Say it!" click="play ()"/> </mx:Application> Code Fullscreen Preview Fullscreen escape url play Sound URLRequest text