How to add a new Stage to my default stage?

Posted by Raigomaru on Stack Overflow See other posts from Stack Overflow or by Raigomaru
Published on 2010-03-17T09:40:29Z Indexed on 2010/03/17 9:41 UTC
Read the original article Hit count: 246

Filed under:
|
|

I want to add a new Stage called field to the default stage (i need to place different elements on it later). And then i want to add a bitmap called myBitmap to the field. But nothing happens. I don't understand what should i do...

            var field:Stage = new Stage();
            field.x = 200;
            field.y = 200;
            field.width = 300;
            field.height = 300;
            stage.addChild(field);


            var bdWidth:Number = 100;
            var bdHeight:Number = 100;
            var bdTransparent:Boolean = true;
            var bdFillColorARGB:uint = 0xFF007090;
            var myBitmapData:BitmapData = new BitmapData(bdWidth, bdHeight, bdTransparent, bdFillColorARGB);
            var myBitmap:Bitmap = new Bitmap(myBitmapData);
            myBitmap.x = 10;
            myBitmap.y = 10;
            field.addChild(myBitmap);

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about flash