PDA

View Full Version : Why????


Cvegas
05-10-2001, 02:29 PM
I'm having a problem with Flash 5. I have two .swf files that I want to combine I guess. One is a animated text logo made with FlashTyper and the other is an audio track. All I want to do is combine the two so I'd just have one file. I tried importing both files and it won't work. What am I doing wrong? Can my goal be achieved?

bep
05-10-2001, 03:11 PM
This might help; I copied it from actionscripts.org library...


Put a looping audio track in my movie as well as toggle it on and off


Probably the best way to add an audio track to your movie would be to load the music file as a seperate swf file. By doing this you
reduce the download time of the main movie considerably.
The following example uses the sound object:
1) Open up a new swf file. On frame 1 add the script:

mySound = new Sound();
mySound.attachSound("liabrarySound");

This action attaches your music track from the liabrary. To attach a file from the library:

a) Select your file in the liabrary, click the options button then choose 'Linkage'.
b) In the linkage panel choose 'export this symbol' and type the name you want to give your file. I opted for' liabrarySound'.

2) Place two buttons on your stage, on and off.
On the button to start your music:

on (release) {
mySound.start(1,100);
}

This action will start your music after 1 second and loop it 100 times.

3) Button to stop your music:

on (release) {
mySound.stop();
}

Save this movie to the same folder as your main movie. To load this movie into your main movie use the load movie action:

on (release) {
loadMovieNum ("musicFile.swf", 5);
}

This action will load your audio track into level 5.

Cvegas
05-10-2001, 03:19 PM
I'll try that. Problem is though, when I open the main movie (The logo file), flash just plays the movie. When I try to import it, it doesn't go to the library or anything. I'm lost.

Jesse
05-11-2001, 05:59 AM
Can't you just use loadMovie to load them both into a parent movie? That's what most people do with Flashkit's TYPER files.

Cheers

Jesse