The user will have to create his own mouth shapes in the 12 frames.
So when I create the program, you'll be able to sync a wav file to an animation then export the AS, so it can be used in KM. Would be great if the AS could be one script.
Set the FPS value to 30.
Now ... for each keyframe where do you need a pause,set this script: del =30;
onEnterFrame = function(){
del -= 1;
if(del == 0){gotoAndPlay(x);}
}
stop();
So ...
for keyframe 3 you'll have: del = 90 , x = 5
for keyframe 5 you'll have: del = 30 , x = 1
and so on.
Originally posted by FLASHPULSE
Thanks again Remus but what I'm looking for is one script to go on the main movie clip that holds the 12 frames. So here's an example...
onClipEvent
goto frame 5
wait a second or two
goto frame 1
wait a second or two
goto frame 11
wait a second or two
and so on...
Does that make any sense?
Ahaaa ... so you're looking for a sequencer. OK.
Create an empty movieclip in the first frame.
Add the following script for it:
onClipEvent(load){
faz = 1;
del = [0,30,90,60];
jmp = [0,5,1,11];
}
onClipEvent(enterFrame){
if( faz < 5){
if(del[faz]>0){
del[faz] -= 1;
}else{
_parent.gotoAndPlay(jmp[faz]);
faz += 1;
}
}
}
note: copy and paste this movieclip in each keyframe of your main movie.
That's all.
That's exactly what I'm looking for but can't seem to get it to work.
I created a movieclip and entered the script. Added my 12 frames in the movieclip and put text in each frame so I could see if the script works but I get nothing.
Originally posted by FLASHPULSE
Here's the file if you want to look it over, unless you're at work.
That's because the sequencer and the main movie are two different things (movieclips).
In your example is one and the same thing, and this is wrong !
Replace _parent.gotoAndPlay(jmp[faz]); with this.gotoAndPlay(jmp[faz]);.
Also, if you have a single keyframe animations, you have to add the stop(); action for each keyframe.
Come on JOE, you can do better than that !
LOL! I've been trying to work on this all night. Brain is sleepy at the moment. It's 2:44am here, going to bed and will work on it tomorrow, thanks Remus.
Ok, is this what you were talking about. The script seems to go through these frames in this order, 1,2,1,2,1,2,3, although that doesn't look like what it should do looking at the AS. Going to bed now.
Originally posted by FLASHPULSE
Ok, is this what you were talking about. The script seems to go through these frames in this order, 1,2,1,2,1,2,3, although that doesn't look like what it should do looking at the AS. Going to bed now.
Don't use tweens for AS keyframes !!!
How many times I have to say it ?
Hey Remus, after getting some sleep I got it to work both ways, with "_parent" and "this". The reason I was going with the "this" way, is so the main timeline could have all the animation (characters and so forth) and multiple movieclips could use your script for the lypsync.
I understand the way you were going about it with "_parent" now and that would work well also.
Thanks again! (just trying to stay in your black book, LOL)
ARRRG!!! This $%#@ server is always busy. Been trying to post for a half an hour now
Hey Remus, can del have values of 1.25, 2.5 and so forth and play properly? The reason is, is because I need to get down to the milliseconds in my lipsync program. One second intervals is not quick enough for mouth movments. Also, in my program you can choose a framerate between the values of 12 and 30. I had to add that in because I knew if I didn't some one would complain that they couldn't choose their own fps.
Oh, the script is fine the way it is, no need to rewrite, just wondering if del will be able to use decimals? Thanks again.
As far as I can tell the routine Remus posted isn't accurate to the second but accurate to the frame. You can only display one mouth shape per frame so that should be enough.
But if you want it to be accurate I doubt if this approach will work. The only accurate approach for syncing is using sound.position because a flash movie will never play exactly at the specified framerate.
Thanks for the information Wilbert. I knew that it wouldn't be acurate to the "T" or anything but I was wondering if I use a number that cotained a decimal if flash would accept it. In my test it worked but I wasn't sure if flash just saw it as (for example) 2 or 2.50? It was just a quick test to see if it would work. Not long enough of a test to see if timing went off down the line. That will be done later.