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

global variables

Get Adobe Flash player
by cpu_t 13 Jul 2010
    Embed
/**
 * Copyright cpu_t ( http://wonderfl.net/user/cpu_t )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/cWcr
 */

package {
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            usagi = {color:"White", age:2};
            var tracer:Tracer = new Tracer();
            var txField:TextField = new TextField();
            addChild(txField);
            txField.text = tracer.traceUsagi();
        }
    }
}
var usagi:Object;
class Tracer {
    public function traceUsagi():String
    {
        var msg:String = "";
        for(var i:String in usagi){
            msg += i + ":" + usagi[i] + ", ";
        }
        return msg;
    }
}