flash on 2013-10-15

by yurij.shaulov
♥0 | Line 19 | Modified 2013-10-15 13:54:27 | MIT License
play

ActionScript3 source code

/**
 * Copyright yurij.shaulov ( http://wonderfl.net/user/yurij.shaulov )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/7b3M
 */

package {
    import flash.text.TextField;
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var tf:TextField = new TextField();
            tf.text = "hello";
            addChild(tf)
            var sreq:URLRequest = new URLRequest("http://www.freesound.org/data/previews/65/65691_4948-lq.mp3");
            var so:Sound = new Sound(sreq);
            so.load(sreq);
            so.play();
            tf.appendText("\n"+so.length);
            tf.appendText("привет")
            
        }
    }
}