tags:

views:

28

answers:

1

Hiya. I created several components that are placed inside a VGroup.

in one of the components code, i want to add an image and to move it. i don't want the image to be part of the vgroup and to be bound to the vgroup area, i want it to be like float in css. how can I do that?

update

I want to be able to move the element in the entire area of the application. not to move it within the vgroup. i don't want this object to be attached to any container besides the main application window in order for me not to have limits how much can i move it and where.

example.

If i created a new mxml component called test that extends a VGroup component. inside that vgroup i want to be able to do something like

Main_Application_Window.addElement(myElement) 

which will allow me create animate that will move the element through the entire screen.

thanks!

+1  A: 

Having the VGroup control things outside of its boundaries seems like a violation of OO principles to me. A more common approach would be to have your custom VGroup dispatch a custom event, which your main application would be listening for, and have the main application handle creating/placing/moving the element around. Hope that helps.

Wade Mueller
helps a lot! thanks
ufk