LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




ReplyREPLY THREAD
 
Thread Tools Display Modes
  #1  
Old 06-15-2005, 04:21 PM
romontj romontj is offline
Registered User
 
Join Date: Apr 2005
Posts: 6
Rep Power: 0
romontj is on a distinguished road
Load External Mp3 and start playing on a certain frame

I am trying to load an external mp3 and have it start playing on frame 430 of my movie. The code I've tried either starts playing the mp3 right away or not at all. Here is what I'm working with:
Actionscript:
onClipEvent (load) {
     // sets up a sound object
     faTrack = new Sound();
     // load the external sound
     faTrack.loadSound("intro.mp3", true);
     // play the sound
     faTrack.start(430);
 }
After using this code it started the movie right after the sound was loaded. What is the proper method to make this work?

Last edited by Scottae : 06-16-2005 at 03:41 AM Reason: Format with AS tags
Reply With Quote
  #2  
Old 06-15-2005, 04:33 PM
saumya's Avatar
saumya saumya is offline
Super Moderator
 
Join Date: Oct 2004
Location: India
Posts: 2,214
Rep Power: 11
saumya is on a distinguished road
just put the below code at the particular frame

Actionscript:
var mySound:Sound = new Sound();
mySound.loadSound("mySong.mp3");
mySound.start();

hope i wrote the correct syntax.Just try and let me know.
__________________
www.saumyaray.com
Reply With Quote
  #3  
Old 06-15-2005, 05:24 PM
romontj romontj is offline
Registered User
 
Join Date: Apr 2005
Posts: 6
Rep Power: 0
romontj is on a distinguished road
Tried it but it didn't work

I didn't hear anything at all. By the way I'm using MX 2004.
Reply With Quote
  #4  
Old 06-15-2005, 05:43 PM
saumya's Avatar
saumya saumya is offline
Super Moderator
 
Join Date: Oct 2004
Location: India
Posts: 2,214
Rep Power: 11
saumya is on a distinguished road
Sorry for that.WEll try this
Actionscript:
var mySound:Sound = new Sound();
mySound.loadSound("mySound.mp3");
mySound.onLoad = function(ok) {
	if (ok) {
		mySound.start();
	} else {
		trace("Cannot Load file");
	}
};
__________________
www.saumyaray.com
Reply With Quote
  #5  
Old 06-15-2005, 06:39 PM
romontj romontj is offline
Registered User
 
Join Date: Apr 2005
Posts: 6
Rep Power: 0
romontj is on a distinguished road
THat doesn't load on the proper frame

Since the song still needs to load it's not playing on time. Is there a way to have the song load earlier and then call it later on?
Reply With Quote
  #6  
Old 06-15-2005, 06:52 PM
saumya's Avatar
saumya saumya is offline
Super Moderator
 
Join Date: Oct 2004
Location: India
Posts: 2,214
Rep Power: 11
saumya is on a distinguished road
ya.Just add following in the first frame of your movie
Actionscript:
//to stop yoour playhead
stop();
var mySound:Sound = new Sound();
mySound.loadSound("mySound.mp3");
mySound.onLoad = function(ok) {
	if (ok) {
              //to continue playing your animation
                play();
		//mySound.start();
	} else {
		trace("Cannot Load file");
	}
};
Now add the follwing in the frame, from where you want the sound to play
Actionscript:
mySound.start();

is it ok now?
__________________
www.saumyaray.com
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MP3 not playing until volume slider is activated pagey123 Newbies 0 12-18-2007 11:11 PM
Load music from mp3 CHAMPAIN Flash 8 2 05-10-2007 03:10 PM
Loader component and MP3 troubles Floyd80 Flash MX 3 05-30-2006 10:30 AM
Flash MP3 Player - On Load Shadi Flash MX ActionScript 1 08-14-2004 08:06 PM
Learning to make Load screens E-dog Newbies 0 09-15-2003 06:46 AM




All times are GMT. The time now is 03:14 PM.