We have a TileList of images. As the user drags a new image along the list (deciding where to drop it) a blank frame drops in to show them where it will be inserted when they drop it. Therefore, I have to add and remove simultaneously, while still dragging. For example if they are at index zero, a blank frame is in index zero. As they move to 1, the blank frame appears to move from index zero, to index one, as the image that was at index one appears to move to index zero. But what I'm really doing is just removing and then adding the blank frame.
I think the following code should accomplish this. And it works, most of the time. Every so often, there is a delay where is does the REMOVE, and then waits until the Back.easeOut tween is complete, and then does the ADD. It is intermittent. Any ideas, or is there a better way to do it? Thanks
You could do this a couple of ways, you could have a slight delay set on the remove effect so that it doesn't interfere with the ease function.
You could add the item instead of an empty frame, on the dragdrop event you don't need to do anything if you get a dragexit triggered then you simply remove the item completely.
I'll try putting in some delays.
As far as your second suggestion, I'm probably not being clear. By blank frame, I mean a white image, the same size as all the other images. It drops in between images, as you drag your new image down the line. It says, "Drop Here" or something.