[haXe] Access to Stage in AS3 from haxe
l u c h y x
luchyx at gmail.com
Wed Sep 20 17:36:44 CEST 2006
It work's
var stage = flash.Lib.current.stage;
But I was extending Sprite who inherits the stage prop from
InteractiveObject, that by default is null. :S so the addListener fail.
Thanks nicolas.
P.D: Enjoy the mac.!
On 9/19/06, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
>
> > Hi list i try to modify the stage alignement properties and scaling from
> > HAXE code and the player return this error.
> >
> > /*code*/
> > var stage = new flash.display.Stage();
> > stage.align = flash.display.StageAlign.TOP_LEFT;
> > stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
> > /**/
> >
> > ArgumentError: Error #2012: Stage class cannot be instantiated.
> > at Demo$/main()
> > at MethodInfo-62()
> > at flash::Boot$iinit()
> >
> > How can achieve this with HAXE?
>
> Try using the following :
>
> var stage = flash.Lib.current.stage;
>
> Nicolas
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
--
l u c h y x
r i a e v o l u t i o n (r)
luchyx at riaevolution.com
http://www.riaevolution.com
Phone: +54 (11) 4931-7006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20060920/284191e4/attachment.htm
More information about the Haxe
mailing list