Flash runtime audio problem
- Started
- Last post
- 20 Responses
- kbags
Pls. bear with me...
I have a 4-chapter runtime flash presentation with voiceovers, photos, and some video. Whole thing is fairly large (72MB) so it works the PC pretty hard.
Each chapter has a base file in layer 1 that houses audio voiceovers for the whole chapter and launches sequential files in layer 2.
When the final movie for a chapter finishes, it launches the next chapter root movie in level 1 and clears out level 2 as it goes out the door. The next chapter repeats the same process.
On my machine--AMD Athlon notebook, pretty hardcore--I've got the thing jamming perfectly. When the client runs the beta on another machine, the audio races ahead because some of the chapter files are taking too long to initialize and run. So now, the whole presentation is off...and it's due tomorrow.
- honda0
Are you streaming the audio? Sounds like you have the audio set to run as an 'event' streaming plays the audio across keyframes thus keeping the pace/rate the same if played on a fast or slow machine. However, this does affect sound quality.
- cinder0
you gotta use the sound thing that will skip frames to keep up.
- honda0
stream stream stream
- kbags0
No kidding? That's ALL I have to do??? Doing this will stream for how long?
Mind you, this will downloaded onto a presentation laptop from a CD-ROM. One file launches the whole jammy.
- honda0
Streaming the file will elongate its length across the time frame, thus animation that once took place in sync with your original audio will be off by a little in some areas and a lot in others. But setting it to stream will indeed pretty much guarantee that the audio and animation will stay in sync. Could involve a lot of editing depending on how long/synch'd the current file is.
- kbags0
Tried it, and here's the thing:
1a.swf - level 1, plays music file and shows some pictures, right? At the end of the timeline, it launches 1b.swf in level 2, which has no audio, just more pictures in a timeline, right? At the end of the timeline, it launches 1c.swf into level 2, replacing 1b.swf. Same deal, then it launches 2a.swf in level 1 and clears itself out of level 2.
When I stream, the audio cuts off as soon as 1b.swf loads...need audio to play through 1a.swf through 1c.swf, end on a dime, and then new audio starts with 2a.swf.
- kbags0
also, I previously had it on start, not event...
- honda0
Are you loading these .swf's into their own _mc? like createEmptyMovieclip();
- kbags0
embarassingly, no.
I am using loadmovienum stock flash shite scripting. e.g.:
loadMovieNum("1b.swf", 2);
However, I can usually pick AS stuff up if you can explain...I'm just not an AS jock. Yet.
- honda0
Hold tight, writing a solution for you.
- honda0
Found what may help:
http://chattyfig.figleaf.com/ezmā¦Sorry it took so long, but try this. Granted your not looking for the ability to control the .swf, what you will now be able to do is load each .swf into it's own _mc and then later use the removemovieclip(); function to get rid of it. All while retaining your normal timeline. That should work. lemme know.
- kbags0
RAD! You rock, man. Thanks so much for hooking it up.
I'm werkin on it right now..so far, I used it for one scene and the script worked. Do I keep using the same script, do I change variables other than file names?
- honda0
Yep, you got it! Keep using it and change the vars.
Good luck homie!
- honda0
like, holder_mc is the main thing. that should represent each file you are loading. if loading 1a.swf then 1a_mc. next time you use 2a_mc when loading 2a.swf. Make sense?
- kbags0
this.holder_mc.loadMovie("subaru...
---->
Just change "subaru" to "2a", no?Time for me to buy that teach yourself actionScript in 15 minutes book. I'm such a loser. You'd think I'd have gotten off my ass and done it by now.
Thanks for your patience. I hope you at least have an aeron or something.
- honda0
hehe, its all good man.
holder_mc : this var will change. my suggestion is to have it match the .swf you are loading. In your example it would be:
this.twoA_mc.loadM ovie("2a.swf");
Remember, you have to change the holder_mc var each time along with the movie being loaded. you're on the right track! go man go! =]
- kbags0
Cool man, I smell what you're steppin in!
Does this script cover the unload part automatically? Not 100% clear on the bytesloaded bit.
ThanksaMillion, honda. Huge!
- honda0
in essense, if you wanted, you can have text on the screen that would show the "loading" taking place. its preloading the .swf prior to allowing you access to it. The entire contents of the load .swf have to be completely loaded before you can being controling.
if you had a textbox on the main stage you could do:
myDisplayu.text = l;
- honda0
damn, my grammar is teh sux. i must be gettin tired.
- kbags0
Yeah, tell me about it...deadline extended to Friday. Whoohooo!
*wipes brow