[flexcoders] place object on stage from class

2006-03-06 Thread witchythewanderer
How can I place a canvas or other object on the stage from a class? I've tried the following public class Window extends Sprite { private var c:Canvas; public function Window() { c = new Canvas(); c.setStyle(borderStyle, solid);

Re: [flexcoders] place object on stage from class

2006-03-06 Thread Abdul Qabiz
Hi,DisplayObject's, such as Sprite, MovieClip have properties called stage and root.A flash/flex2 application can only have one stage but can have multiple roots (for each loaded SWF/Image). Check out the DisplayObject API for stage and root

Re: [flexcoders] place object on stage from class

2006-03-06 Thread Abdul Qabiz
But what are you trying to do? I mean, you can do same thing in better and easier way?If it is a Flex 2 application:You can do something like this:##WindowSample.mxml##mx:Application xmlns:mx= http://www.macromedia.com/2005/mxml creationComplete=onAppInit() mx:Script import Window; private