On Oct 18, 2007, at 9:09 AM, bjorn - wrote:

I've got this problem where I have images in a TileList and when I start do drag an image the image disappears (goes black) in the TileList. I can still see the image in the drag proxy though. When I release the drag I don't see the image anymore (until I drag it again, and I will see the image in the drag proxy image).

Hmm... that sounds like you are not assigning the drag proxy right. It almost sounds as though you are assigning the image in the TileList itself as the initiator and proxy?

Did you cast it to a new image and then using that new image as the proxy?

Event in the main tag for the itemRenderer:

mouseMove="dragIt(event)"

Then the following:

        private function dragIt(event:MouseEvent):void {
                var dragInitiator:Image = Image(event.currentTarget.image);
                var ds:DragSource = new DragSource();
                ds.addData(data.source, data.type );
                var imageProxy:Image = new Image();
                imageProxy.source = dragInitiator.source;
                imageProxy.width = dragInitiator.width;
                imageProxy.height = dragInitiator.height;
                DragManager.doDrag(dragInitiator, ds, event, imageProxy);
        }

That should create a new image that you use at the proxy and shouldn't touch your existing one in any way. Alternately, you can use a Bitmap.

just a thought.

good luck,

jon

Reply via email to