Thank you for your reply.
I work only with AS, I mean with no MXML. I tried to use the Canvas container but using the mx.containers.Canvas, there is no right property (even top, bottom, left). What do I miss? dennis From: [email protected] [mailto:[email protected]] On Behalf Of jamesfin Sent: Wednesday, November 18, 2009 7:01 PM To: [email protected] Subject: [flexcoders] Re: constraintColumns/constraintRows on extended Sprite object REFdn6025643069 You can always do this where the right / top is constraining the item. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.core.UIComponent; private function init():void{ var spTest:Sprite = new Sprite(); spTest.graphics.beginFill(0xFF0000); spTest.graphics.drawRect(0, 0, 100, 100); spTest.graphics.endFill(); logo.rawChildren.addChild(spTest); } ]]> </mx:Script> <mx:Canvas width="100" height="100" right="20" top="20" id="logo"/> </mx:Application> --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "dennis" <den...@...> wrote: > > Hello people.. > > > > I have an extended Sprite object and I put in on the Stage (via addChild). > > How may I "anchor" it on runtime on the Stage? > > How may I constraint it in Columns and Rows? > > > > Suppose that I want a Sprite(Panel) object, to be always 20 pixels from > right edge of the Stage, even if the Stage resized. > > > > Thank in advance. > > Dennis > __________ NOD32 4618 (20091118) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com

