Rachel:

If I understand your dilemma correctly, the following ideas may help.

1) Declare a variable to represent the container that you'll need to
reference during the drag & drop action, e.g.:
private var _myParentContainer:TileList;
2) In your item renderer's creationComplete event handler, assign the
value of the container to the variable, e.g.:
_myParentContainer = this.parent.parent.parent.parent as TileList;
(Use trace statements to help you determine how many ".parent"'s you
need; Flex inserts some intermediary objects that are not readily
apparent.)

3) In the drag & drop code, use the variable to reference the target
container as needed:
_myParentContainer.doSomethingCool();
4) After the drag & drop is complete, update the value of the variable
to the item renderer's new container:
_myParentContainer = this.parent.parent.parent.parent as TileList;

It's hard to be more specific without seeing the actual code, but
perhaps this will be enough to get you past the current obstacle.

HTH

-Jim



Reply via email to