I am fairly new to flex, so I apologize if this is an obvious question. I have searched the forums, played with my code for several hours, checked my resource material and still can't seem to come up with a workable solution.
I have a VBox with 20 or so <mx:Image> components. I read some data from a web service and based on that data I select one of those images. At that point I want to change states using the "currentState=" method. I wont all of the other objects in this state but that single selected object to go away as I transition states - during the transition I want to take that object and add it to a different container object that is visible in the new state. Essentially, I want the appearance of this to be that an object was selected, the rest of the objects fade away and then this object is added to a new container and the object gracefully moves to the location in the new container.
I have tried several approaches and none of them seem to work.
(1) I have tried having this image already in a container in the new state and doing a move transition.
(2) I have tried using states.push() to add the new state to the selected object.
(3) I have tried to set the X and Y of the object in the new state to the X and Y of the old state and then move it manually to the new location. That doesn't seem to work as the X and Y are relative to the container.
Any ideas are appreciated?
I think I would remove it, use the popupmanager to float it, move it, and
add it to the new container. You probably can't do that with states very
Another option would be to put the images in a List and fake drag/drop and
mouse events to automate dragging to a destination.