Welcome to WebmasterWorld Guest from 54.242.72.36

Forum Moderators: open

Message Too Old, No Replies

Auto action at end of sound file

     

djtaverner

7:01 am on Sep 9, 2004 (gmt 0)

10+ Year Member



Hello

I have a game with > 200 sound files. These are vocal lines to which I match generic lip synching.

I need a automatic system by which an lip synch animation stops when a sound file reached its end.

What system would be best here given it has to apply to 200 lines?

Cheers

jezra

5:16 pm on Sep 9, 2004 (gmt 0)

10+ Year Member



Supposing the sync animation movie clip is called syncAnimation, I would make a 3 frame movieclip and name it syncControl. The first frame would have the stop() action, second frame is empty, and the third frame would have ( in pseudo-code )

if ( the sound is playing )
{
//keep looping the syncControl
gotoandplay(2);
}else{
//the sound has stopped, so stop the animation
//i'm assuming frame 1 of the syncAnimation
//has the mouth closed.
syncAnimation.gotoandstop(1);
//reset the syncControl
gotoandstop(1);
}

now on the frame in your timeline where the audio starts, you would need to add:
syncAnimation.play();
syncControl.gotoandplay(2);

I'm sure there is a more elegant way to do this but I haven't had enough coffee yet.
jezra

Caimin

8:51 pm on Sep 13, 2004 (gmt 0)

10+ Year Member



Don't forget there's onSoundComplete which maybe of help...

jezra

10:05 pm on Sep 13, 2004 (gmt 0)

10+ Year Member



good call Caimin, I knew there had to be an easier way. I should probable do more work with dynamic audio and drink more coffee.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month