Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-16-2001, 04:20 PM   #1
mediaman
Registered User
 
Join Date: Feb 2001
Location: Snohomish, Washington
Posts: 16
Send a message via AIM to mediaman
Question

Probably a simple one... I just don't get it. Can someone point me in the right direction to learn how to put a looping audio track in my movie as well as toggle it on and off. Thanks.
mediaman is offline   Reply With Quote
Old 03-17-2001, 01:31 PM   #2
Marx
New Member
 
Join Date: Feb 2001
Posts: 378
Default

Hi...

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.

Hope this helps.
Marx is offline   Reply With Quote
Old 03-19-2001, 12:47 AM   #3
mediaman
Registered User
 
Join Date: Feb 2001
Location: Snohomish, Washington
Posts: 16
Send a message via AIM to mediaman
Wink Thanks for the help.

Thanks for the help... that sounds easy enough. Thanks for explaining it so well.
mediaman is offline   Reply With Quote
Old 11-24-2001, 12:30 PM   #4
leky
Registered User
 
Join Date: Oct 2001
Location: Sydney
Posts: 23
Send a message via ICQ to leky
Default Hope you can help me too

Hi... MARX

I also have a problem with the sound in loading second swf. I stucked with this for three days and couldn't solved.

Please go to this topic and read my situation, if you don't mind.

http://www.actionscripts.org/forums...=&threadid=6931

Cheers

Leky
leky is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background class MichaelxxOA ActionScript 2.0 20 05-30-2006 10:23 PM
Background music for site rustys27851 Other Flash General Questions 2 01-05-2006 06:18 PM
How to control music background? bncl Other Flash General Questions 1 05-07-2002 09:22 AM


All times are GMT. The time now is 11:38 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.