I'm implementing a blackjack game in flash and so far the logic is fine but there is no animation for the cards so they just appear and disappear which doesn't look very pleasing to the eye. I want to add some animations for when cards are dealt where they slide across to their position one by one.
Is there a simple way to just tell a displayobject to interpolate from one position to another while waiting for it to complete?
My current thought would be to just do something like this:
on enter frame:
if a card is animating:
move it further towards its destination;
continue;
else (if it is done animating):
process as usual;
end;
end;
I believe this would produce the results I'd expect because the game should only continue after the card being dealt is where it should be. However, this feels like a weird approach and I'm probably over thinking it which is why I'd like to know if any of you have a better solution.