[osflash] haXe Alpha 3 Released
Nicolas Cannasse
ncannasse at motion-twin.com
Wed Nov 30 17:28:00 EST 2005
Aral Balkan wrote:
> Hey man,
>
> Cool stuff! Any idea why I'm getting the following error:
> "Field onEnterFrame have different access right than previous one"
>
> AFAICS, the methods have the overloaded methods have the same access
> rights. A trace for "this" returns "_level0" so I would expect it to
> compile.
>
> With:
>
> class Counter extends MovieClip
> {
> var i:Int;
> var tf:TextField;
>
> function onEnterFrame ():Void
> {
> tf.text = "Wow, it's frame: " + (i++);
> }
>
> function onLoad():Void
> {
> this.createTextField("tf",0,0,0,Stage.width,Stage.height);
> }
> }
MovieClip is declared as an "extern" so all its fields are public by
default. For normal classes, haXe default access is "private", so you
only need to tell "public function onEnterFrame" and same for onLoad.
Nicolas
More information about the osflash
mailing list