Movie functions

Hi

I need to do the following:

I press a button, and a image fades in. Pressing another button should first fade out the previous image, and fade in the image that belongs to the now pressed button. The fade in effect have I done in the main frames as a tween, and pressing the button looks like this:

*on(press){
_root.gotoAndPlay(“producers_in”);
}

*how do I gotoAndPlay(“producers_out”) before the next tweening starts at another frame? a for-loop and playNextFrame or something? The pressed buttons needs to know what the previous loaded tween was, so it finishes the right one!

regards, henrik, sweden

you could always make your button call “producers_out” and then make “producers_out” call “producers_in”.

another way would be to use setInterval() and create some sort of delay.