Why is this so freaking hard?
This is insane.. Create the image, set the source property and then
move it to the center of the stage..
And it's not working!?

        <mx:Script>
                <![CDATA[
                        import mx.controls.Image;
                        import mx.controls.Alert;
                        public function init():void
                        {
                                var icon1:Image = new Image();
                                var icon2:Image = new Image();
                                icon1.source = "img/icon1.jpg";
                                icon2.source = "img/icon2.jpg";

                                can.addChild(icon1);
                                can.addChild(icon2);
                                
                                //icon1.x = can.width - icon1.width;
                                //icon1.y = can.height - icon1.height;
                                
                                //icon2.x = icon1.x;
                                //icon2.y = icon1.y + icon1.height + 20;
                                
                                icon1.move((can.width - 
icon1.width)/2,(can.height - icon1.height)/2 );
                                icon2.move((can.width - 
icon2.width)/2,((can.height -
icon2.height)/2)+ icon2.height + 20 );

                                //icon2.cacheAsBitmap = true;
                                //icon1.cacheAsBitmap = true;
                                
                                
                        }
                ]]>
        </mx:Script>


What am I doing wrong and why does Flex have to be an ass about it?


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to