Helping Adobe Flex community in developing Rich Internet Applications (RIA) in MXML, Actionscript and Flash.

<mx:Label text="Crazy about Flex"/>

You are not logged in.

#1 Mar 12th 2010 8:54 AM

clem_c_rock
Flex Newbie
Registered: Mar 12th 2010
Posts: 1

Setting module x and y coordinates

Hello,
    I'm pretty baffled by the lack of information I've found about this and even more baffled that it doesn't look like there's support for this functionality. 

I'm building a custom module loader and I want to send x, y, width, height coordinates for each module I'm loading so I can dynamically place modules where I want them.

I have my moduleReadyHandler as such but when I set the x, y coords the modules placement is unaffected

Code:

private function moduleReadyHandler(event:ModuleEvent):void
{
    child = module.factory.create() as DisplayObject;
    dispatchEvent(event);

    if(child)
    {
        child.x = 100;
        child.y = 100;
        addChild(child);
    }
}

Any ideas?

Thanks,
Eric

Last edited by clem_c_rock (Mar 12th 2010 11:14 AM)

Offline

 

Board footer

Powered by PunBB