I created a loader for my swf file, and I'm using the streaming method for the mp3 track which seems to keep the audio and picture in sync, but the sound keeps loading and playing when the swf's about 50% loaded. The result is that the opening frames are dropped. http://www.thing-one.com/07-site I've been searching the forum and I have not been able to find a solution to this. Can anyone help? I'm obviously no Flash expert, so any help would be MOST appreciated. Many thanks!
You should start the audio once the rest of the swf is loaded using the onLoad or loaded functions to find when your swf graphics are loaded and use the ..play() on your audio. You will also need to turn off the autoPlay on the audio.
thanks for the responses... for the quasi-Luddite here, can you provide any more specifics on exactly how to set up the onLoad and the .play() on the audio?
[q][i]Originally posted by: [b][b]cmorrissey[/b][/b][/i] You should start the audio once the rest of the swf is loaded using the onLoad or loaded functions to find when your swf graphics are loaded and use the ..play() on your audio. You will also need to turn off the autoPlay on the audio.[/q] What?? First, there is no .play() for audio. If you setup the audio using new Sound(), it's called .start(). Second, I don't believe the graphics are loaded externally, so to check if everything is loaded before you start your audio, you would either check if all the frames are loaded or use getBytesLoaded().
I'm sorry, you guys have lost me. Do you know of any tutorials on this subject out there?
Shan, Because I don't know how his clip is set up I gave him some possible functions he can use. If i was doing this i would be loading everything from external files and using the playback component and not the Sound() functions as these functions severely limit your ability to control the sound in the project, unless you find that the panning functions are something you really need. Please help by being constructive. ----------- DK, Heres what you will want to do. I believe you are using the loader component correct ? ok now since you are using this you can use the below action script with some adjustments to tell your audio to start by using the Sound functions or the playback component functions since I am not sure what you are using. If you are not using the loader component to load your pictures please let me know what you are using so I can get you on the right track, thanks. var listenerObject:Object = new Object(); listenerObject.complete = function(eventObj:Object){ // ... your .start(); or .play() here }; loaderInstance.addEventListener("complete", listenerObject);
Shan -- this is so cool of you to fix it for me! I'm only a humble band parent trying to help out on the weekends, so many thanks! I'll try to decipher what you did for future reference. CM -- thank you for the code! I'm still not quite sure how I would implement it, but I'll spend some time trying to understand. (Although I think this action script is for rocket scientists) You guys... and this forum ... are both really terrific.
Don't see what you're looking for? Try a search.
|