Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Audio clip and load movie

Status
Not open for further replies.

H2322

IS-IT--Management
Nov 26, 2003
6
FR
I have created a button action that loads in an external swf and also have an audio clip attached to that button. How can I make the audio clip play in it's entireity before the action kicks in?

At the moment my audio is getting cut off as the action starts on release.
Thanks
 
A soundObject? How long?

Regards,

cubalibre2.gif
 
Only about 5 seconds or so. It plays if you keep the mouse pressed down but as soon as you release the next scene loads up.
Thanks
 
Try inserting the sound in it's own movie clip, witha stop(); action on it's first frame. Set this sound's Sync to "stream" and lay as many frames needed on the movie clip's timeline, so that the whole sound can be heard. Add your .swf's loading action on the last frame of this sound movie clip. Drag this clip on stage and give it an instance name.
Last on your button, only start your sound clip playing. When it's done it will load your .swf.

If you want to have several buttons, but use the same sound clip, to load up different external movies, then simply set a common variable (movie_to_load) on your buttons' presses, and use this variable at the end of your sound clip, rather than the specific name of the movie to be loaded.

Regards,

cubalibre2.gif
 
Hi,

Still having problems with this. I now have my sound playing in a movie clip when I press the button but it still won't load up my .swf.

In the last frame I have tried LoadMovie, gotoandplay and play but none seem to work. I think I'm missing a bit at the beginning. I would usually use (on release) but it doesn't seem appropriate in this case.

Hope this makes sense, I think I'm halfway there.
Thanks
 
What's the exact code you're using to load this external movie, and where are you loading it? In a container clip? On another level? In a popup?

Otherwise, can you post a list to your working .fla? Zipped up and in MX only format?

Regards,

cubalibre2.gif
 
Hi,

When I was loading my movie before in my button I had:

on (release) {
loadMovie ("2.swf", 0);
}

2.swf being my movie.

Now I have "home1.swf", "soundClip");

With soundclip being a movie clip on my page loading up the sound home1.swf

In home1.swf I have a stop action in the first frame as you suggested and

on (release) {
loadMovie ("2.swf", 0);
}

in the last frame. It's this bit that isn't working.
Very confusing!
%-)
 
Well first, you seem to be wanting to load your new movie on level 0, which will rid you of your first movie, the second one replacing the first movie as the main movie... Are you aware of that?

Second, if that's really what you want to do, then you should be using loadMovieNum, rather than just loadMovie, which is usually used to load an external movie in a container clip. And you shouldn't have a button on release handler action, unless you have a button in your "home1.swf"... A simple frame action was what I had in mind...

loadMovieNum("2.swf", 0);


Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top