Synchrous setInterval() call

I’m trying to wrap my head around this problem, and I could use some help with brainstorming.

I’m programming a card game using ActionScript 2.0 and here is what I would like to achieve:

I would like to call a dealCard() function and then have a card animate from one part of the screen and move to another, undetermined part of the screen. I think that using setInterval() would allow me to move the card’s position as it was moving across the screen, but I need it to stop moving before the next call to dealCard() is made. That’s where the synchronous part comes in.

Perhaps I can clarify with some pseudo-code. Image this is my game logic (simplified of course):

function playGame() {
    dealCard("J", "H");
    dealCard("A", "S");

And this is what I want my dealCard() function to perform like:

function dealCard(value:String, suit:String) {
    // Show animation of card moving from position (x1,y1) on screen
    // to (x2,y2) and then return.

Note: x1,y1,x2,y2 will be determined at runtime, and therefore, I can’t create the animation at design-time and simply insert it. All the variables will change as the program proceeds.

If I can code dealCard() this way, so that it doesn’t return until the animation is complete, and each card is “dealt” in order and the animations won’t overlap, that would be perfect.

Any ideas?