static var typed w private class
How do I get rid of this timer bullshit?
♥0 |
Line 18 |
Modified 2011-11-08 01:24:36 |
MIT License
archived:2017-03-10 18:41:26
ActionScript3 source code
/**
* Copyright makc3d ( http://wonderfl.net/user/makc3d )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/bITT
*/
package {
import flash.display.Sprite;
import flash.utils.setTimeout;
public class test extends Sprite {
public function test () {
// without constructor, you get
// Error: Access of undefined property stage. Wonderfl.capture( stage );
// but whatever... the point is below
}
// [Fault] exception, information=TypeError: Error #1007: Instantiation attempted on a non-constructor.
public static var a:A //= new A ();
{
setTimeout (foo, 0);
}
private static function foo ():void {
// ok... wtf??
a = new A ();
}
}
}
class A {
;
}