In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2010-12-31

Get Adobe Flash player
by 9re 31 Dec 2010

    Talk

    9re at 01 Jan 2011 11:36
    @makc3d yeah, it's xml that can do C style printf in AS3!

    Tags

    xml
    Embed
/**
 * Copyright 9re ( http://wonderfl.net/user/9re )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/5lrU
 */

package {
    import flash.media.Video;
    import flash.media.Camera;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var tf:TextField = new TextField;
            tf.y = 360;
            tf.width = 465;
            
            
            var camera:Camera = Camera.getCamera();
            camera.setMode(480, 360, 30);
            var video:Video = new Video(480, 360);
            video.attachCamera(camera);
            addChild(video);
            
            XML.prettyPrinting = false;
            tf.text = <>
                width : {camera.width},
                height : {camera.height}
            </>.toString();
            addChild(tf);
        }
    }
}