homepage Welcome to WebmasterWorld Guest from 107.21.163.227
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
Auto action at end of sound file
djtaverner




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

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




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

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




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

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

jezra




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved