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], "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
>


Reply via email to