
Welcome Guest
|
|
|
#1
|
|||
|
|||
|
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);
}Last edited by Scottae : 06-16-2005 at 03:41 AM Reason: Format with AS tags |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
Tried it but it didn't work
I didn't hear anything at all. By the way I'm using MX 2004.
|
|
#4
|
||||
|
||||
|
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 |
|
#5
|
|||
|
|||
|
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?
|
|
#6
|
||||
|
||||
|
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");
}
}; Actionscript:
mySound.start(); is it ok now?
__________________
www.saumyaray.com |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |

Art & Design




