hi!
i’m trying to write the code for a flash animation which uses different movie clips and buttons.
all the movie clips are in the same layer but i’ve written code to make all but one invisible when the animation loads.
dance._visible = false;
harmonica._visible = false;
violin._visible = false;
i’ve then got buttons which are supposed to make the movie clips visible, but then disapear again after the clip has played.
i want to be able to press one button to have one clip start playing, but then i want to be able to press another button which stops that movie clip and starts a new one playing.
this is what i came up with but it doesn’t work
on (press) {
violin.stop();
harmonica.stop();
}
on (release) {
violin._visible = false;
harmonica._visible = true;
harmonica.play(1);
}
this script is from one of the buttons which is supposed to start the movieclip harmonica and stop violin playing.
i’ve got the same code for violin but the other way round
when i press a button it works fine and plays the clip which then disapears (leaving a default clip which plays all the time visible) but pressing buttons to interrupt the clip and play another one don’t work properly.
hope this is making sense because i’m slowly confusing myself
anyway the problem is that the movie clips don’t stop and reset when they are interupted. they kind of pause instead. when i go to play a clip that has previously been interrupted it starts from where it has been paused and not from the beginning
i also wanted to ask about this.swapDepths(this._y);
read a tutorial on it because i thought it would be helpful but i havn’t the foggyest how to make it work.
i put all the movie clips in the one layer intending on using the swapDepths command but it didn’t work so i abandoned it.
any help would be greatly appreciated!
Weston