Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




LoadMovie Vs. LoadSound



Hello!

I have created a Flash Jukebox using Flash 5. I have the option of converting this to Flash MX if need be.

My problem is playing the MP3s in the Jukebox. There can be a small or a large number of MP3s available for the Jukebox to play. The MP3s are full songs.

The current problem is that it takes too long to buffer the music before it can start playing it. I currently have each MP3 loaded into a Flash movie. I then use loadMovie in order to play the movie.

Is there a way to get the songs to play sooner?

Thank you.



DevShed > Flash Help
Posted on: August 24th, 2003, 02:38 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

LoadMovie Vs. LoadSound
Ok, this may be a weird one.

Currently I'm working on having several audio tracks available in the projector, and everything works fine as it is. Right now I have my audio published as each track is in its own SWF which I load into MCs in the projector. This works fine also, except that the projector has to completely load each SWF before it can be accessed.

I can convert the projector over to load all the audio with the loadSound() command, but in doing so all the mp3s would have to be available to the projector, and I do not want any of the mp3s to be "public". This projector will be on a CD and I can put all the mp3s in a directory, but if you were to explore the CD the end user would have access to all the mp3s if I did it that way.


Do I need to go into each SWF and change the sound to streaming? Or does it even make a difference?

//currently, each SWF is set up this way
//sc1 is the MC on the stage to attach the sound to
//my_audio.wav is in the library and has been linked properly

demosnd1 = new Sound(sc1);
demosnd1.attachSound("my_audio.wav");

This SWF is published as demo.swf

In the projector:

//demomc is the MC to load the SWF into
_root.demomc.loadMovie("demo.swf");

Then to play the sound would be something like:

on(release){
_root.demomc.demosnd1.start(0,0);}

The way I have everything loading now works great except for the fact that everything acts like "event" sounds (and it slows the projector down when it is asked to load them). Is there a way to make the SWFs that get loaded act like "streaming" sounds?? (remember I am using the loadMovie command in this case)


I have read the whole tutorial from www.kennybellew.com, and there is alot of very useful info (alot of which I had already known or figured out). This particular question was not exactly covered, so I'm wondering if anyone else has had experience with this.
Thanks in advance.

Problem With LoadMovie / LoadSound
Hello....
I am working on a button that hopefully will both load a movie and a sound on the same command. Somehow I am having problems with this, and was hoping for some help. The .swf movie will load, however, the sound wont work. I tried first loading in it thorugh loadSound, then with attachsound ...

I would be really greatful if someone could tell me if I can load both on the same mouse event and what I might do wrong...

-ps. I did load the sound to a movie clip with :
myMusic=new Sound (MusicMC);

Here is the button command.....

on (release) {
unloadMovie (_root.screen);
}
on (release) {
//_root.screen.gotoAndStop(2);
loadMovie ("scen5.swf", _root.screen);
}

on (release) {

_root.myMusic.loadSound("/music/sample1.mp3", true);
_root.myMusic.start();
_root.myMusic.setVolume(100);
}

Pause LoadSound Obj & LoadMovie Obj - InSynch
I am trying to put together a flash project that will allow users to pause and restart movie. From what I understand I need to use loadSound duration/position to be able to pause sound. I have this working from my maintimeline. Which took forever for me to figure out. After this success, I figured out I also have to pause my loaded external .swf movies loadMovie(empty mc). And pause them in synch....

All I am really trying to accomplish is: a 20 minute audio module that will play on very limited bandwidth 33k in some areas, that users can pause. In the past I've accomplished this by cutting my audio into small segments and loadMovie several small .swf from maintimeline (Event sound). Works great, sounds fantastic. But no pause, I would like to be able to give the users control over the movie though - atleast pause. I'm also looking for a way to let them know how much of the movie they have gone through. Global monitor???

Can someone help point me in the right direction?

F8: Can't LoadMovie Until LoadSound Mp3 Is Completely Buffered.
Hi,

I have an mp3 player that loads external mp3s with using loadSound. The problem I am having is flash won't let me load an external swf until the mp3 I loaded is completely buffered. I'm using loadMovie to load my external swfs.

Thanks!

Intermittent LoadMovie And LoadSound Issues?
i have a flash movie that loads another movie into it. it works for me 100% of the time. but occasionally i get email from users of my site saying that the movie "doesn't load". it's the only flash movie on my site that anyone ever has problems with. i can't reproduce the problem myself, and most users don't have any problems at all.

i should say it WAS the only flash movie that anyone ever had problems with. i recently changed another flash movie on my site so that now loads its sounds through loadSound(). now i get the odd complaint that this movie has no sound. again, i cannot reproduce the issue myself.

has anyone else had issues like this, where a small percentage of your users have problems with movies using loadMovie() or loadSound()?

in case it matters, the first movie initially used a relative URL. it now uses an absolute URL. either way, it didn't seem to make a difference -- people had problems either way.

thanks in advance for any input.

[EDIT: forget about the loadsound problem... that turned out to be an entirely different issue (base URL confusion)]

Loadsound?
Hi....how does the loadsound action work? I wanna make some mp3's streamable. I tried to type in a path for an mp3 file located on my server but nothing happens? I wanna have a bunch of mp3's accessable to the public. I know how to use the get Url actions but that downloads the whole song before starting to play! The loadsound is what i think i should use right? I know that its posible to load a new sound into a soundobject somehow? Someone suggested to do a loadmovie (swf) and have each mp3 embedded in it's own (swf)? but I really wanna use the loadsound since thats what it's there fore I think? Any help is highly appreciated!

LoadSound Bug
When using a streaming loaded sound with Flash my computer only plays it when I test publish the flash file and not on the internet... I have also tried listening to other site's streaming music and get nothing?

I have the latest version of the Flash Player (6 r65) and the MP3's are cahced on my machine... they just won't play?

Anyone had this problem?

Loadsound()
Frame 1:

mysound = new sound();
mysound.loadSound("World_Tr-Q-Music-7715_hifi.mp3",false);
if(mysound.getBytesLoaded() == mysound.getBytesTotal()) {
mysound.start(0,1000);
gotoAndPlay("Scene 2",1);
}
else {
gotoAndPlay(2);
}


Frame 2:

gotoAndPlay(1);

this is all in scene 1, scene 2 is the main movie...

every time i play that the movie stops responding... can anyone help?

example... http://systemor1.hopto.org/main.html

Loadsound
My goal was to make a flash version of winamp which would load a selected song from my webspace and play it with all the normal controls. now it works PERFECTLY when the songs and the swf are on my hard drive, yet the instant i upload them, it wont load the songs!

on (press) {
_root.music = new Sound();
location = "/music/" add _root.names[_root.i] add ".mp3";
_root.music.loadSound(location, false);

if (Number(_root.bufferd)>10) {
_root.music.start();
}
}

is the code i use to load the sounds. _root.names is an array of song names. this loads them from the /music/ folder on my hard drive but it wont work of the net :/

has anybody come accross this before? is there something im doing wrong?

Any help apreciated!

Loadsound ? ? ?
Hmm! Okay, I'm trying to pull a sound in from a folder called update. may main file sits outside this in the file structure. on a frame on the main timeline of my main movie i have

audio.loadSound(audio.mp3);

with a container mc on the main stage called audio, yet when i export and play, it doesn't work.. . any ideas?

Loadsound
Hello all,

Here's what I want to do. I want to stream an mp3 when the user opens my swf file. I'd like to have the option of chosing another song and maybe adjusting volume and pausing the song.

I'm an action script novice. Actually, I have no idea what I'm doing. I put this action on the first frame of the movie to start:

loadSound( "http://www.depthofzot.com/music/windowlicker.mp3", true)

It doesn't work. Can anybody help?

Thanks a lot,

Dustin

Please Help With LoadSound
Hello,

I'm trying to create a very simple sound player on my website. I just need play and stop buttons and 1 mp3 to load itself automatically and start playing.

Everything works fine, using the loadSound function, except the fact that my mp3 is played at twice its speed ! I don't understand why... It does the same with any mp3... no changes if I use streaming or event sound. Does the same locally and on the webserver.

Anyone has an idea ?
Thanks !

LoadSound Other Than Mp3
Hi all,

I really need a solution to this. Can I use loadSound to play other than mp3 sound?

I've recorded a sound using java which then create a sound file (wav, aiff or au) and save it.
I need to play the saved sound file using loadSound in flash, but it didn't work.
Is there any way flash can play these type of external sound file?

Thank you in advanced.

Loadsound Again..
hi..
need some help on loadsound...i searched for the same, but did not found helpful.

i want preloader for multiple mp3. in my project some files(swf) have 4-6 sound loop. i want to load all mp3 with main preloader, and play only when respective button press.

LoadSound
I'm having some problems with loadSound in that no sound is loading. I am trying to stream an mp3. Trace functions show that the sound is not loading. I am loading the sound into a MC.
On first frame:

code: var sound_loaded = soundLoader.getBytesLoaded();
var sound_total = soundLoader.getBytesTotal();
var sound_percent = Math.ceil((sound_loaded/sound_total)*100);
onEnterFrame = function(){
this.loadBar._width = (sound_percent/2);
percent.text=(soundLoader.duration);
//duration comes back undefined even after play button is pressed.
}
On play button:
code: on(press) {
soundLoader.loadSound("http://www.theautumnrun.com/joer.mp3", true);
}
soundLoader is a MC

Fla is attached in MX 2004 format.

LoadSound
I'm using loadSound to load an external Mp3. Does anyone know how much needs to be loaded before flash starts playing the mp3?

LoadSound
Hi,

I want to load an mp3 externally, make it stream, but I don't wanna play it right away. The mp3 loads fine, but offline I can hear the first second playing, and when I put it online it starts playing all the way after a bit has been loaded

Code:
coolTune = new Sound (soundLoader);
coolTune.onLoad = function (success:Boolean) {
if (success) {
coolTune.stop ();
}
};
coolTune.loadSound ("music.mp3", true);


Code:
mcPlay.onPress = function () {
coolTune.setVolume (60);
coolTune.start ();
};


I tried several codes, with setVolume too, but how can I load it, not hear it , and only hear it when I click the playbutton?

thanks,

Jerryj.

LoadSound
Hi,

I want to load an mp3 externally, make it stream, but I don't wanna play it right away. The mp3 loads fine, but offline I can hear the first second playing, and when I put it online it starts playing all the way after a bit has been loaded

Code:
coolTune = new Sound (soundLoader);
coolTune.onLoad = function (success:Boolean) {
if (success) {
coolTune.stop ();
}
};
coolTune.loadSound ("music.mp3", true);

Code:
mcPlay.onPress = function () {
coolTune.setVolume (60);
coolTune.start ();
};
I tried several codes, with setVolume too, but how can I load it, not hear it , and only hear it when I click the playbutton?

thanks,

Jerryj.

Loadsound()
can anyone explain why this url

http://www.musicwebtown.com/9608ssp/playlists/63873/501373.mp3

Doesn't load the mp3 in flash via Internet Explorer or a debug SWF, but will load just fine in FireFox????

also the url works fine directly in IE, just not flash.





























Edited: 09/02/2007 at 01:26:55 PM by acridcola

LoadSound
Hello,

I am wondering if anyone out there can help me!!! I'm in desperate need of a fix for a sound problem i have. I know how to fix this problem if i import the sound into the flash file. But i cant do this with this example because the sound file is too large!!

I have some sound files dynamically loaded into my flash file using the loadSound("",false) command.

However i can't get the tracks to pause or fastforward or rewind. Does anyone have any idea how i can do this?? Is there a function out there somewhere that will help me, normally i just speed up the frame rate or reduce for the fastforward/rewind button, but i cant do this in this case as the sound is an external mp3 file :|

Please help, i'm desperate!!???

Many thanks

LoadSound()
can anyone explain why this url

http://www.musicwebtown.com/9608ssp/playlists/63873/501373.mp3



Doesn't not load the mp3 in internet explorer or debug SWF, but will load just fine in firefox????

LoadSound With Wav?
Hey guys, I haven't made a topic in a while.

Though, this is more of a query, does loadSound work with .wav because whenever I load them, they don't work, but mp3s work a charm. and what ARE the supported types?

Help With LoadSound
i have the next code which is working fine:

Code:
mysound.loadSound("music/m1".mp3", true);
i need to know when the sound finished playing?
how can i know?
(i want another clip to stop when the music stops)

LoadSound
Hi,
I want to load an mp3 externally, make it stream, but I don't wanna play it right away. The mp3 loads fine, but offline I can hear the first second playing, and when I put it online it starts playing all the way after a bit has been loaded

Code:
coolTune = new Sound (soundLoader);
coolTune.onLoad = function (success:Boolean) {
if (success) {
coolTune.stop ();
}
};
coolTune.loadSound ("music.mp3", true);

Code:
mcPlay.onPress = function () {
coolTune.setVolume (60);
coolTune.start ();
};
I tried several codes, with setVolume too, but how can I load it, not hear it , and only hear it when I click the playbutton?
thanks,
Jerryj.

LoadSound
I'm having trouble loading an external mp3 file. I have the script below placed in the first frame. The mp3 file is in the same directory as the swf file. Can someone tell me what I'm doing wrong? Please help. Thanks

var my_sound:Sound = new Sound();
my_sound.loadSound("moonlight.mp3", true);
my_sound.onLoad = function(success) {
my_sound.start();
}

LoadSound()
Hi,

Im just wondering what the code is to load mp3s dynamicaly(or whatever its called)

i know its somthing like this

loadSound("url","isStreaming");

what what is the url, is that the url ofthe webpage, or the url of where the sound is in the folder (Eg: graphics/mysound.mp3)

thanks

giles

LoadSound?
I have tried to do a load sound to load a mp3 but all it keeps doing is as me where I want to download it to. I just do't understand why I am having such a difficult time I just want to have some loops play when they are need But the file size is too large for my main movie timeline,
when I try to link it from the library it cause my preloader to not work until the sound has loaded. When I try to load a swf withe the sound links it only works at level 0 which blanks out my screen obviously and when I try to load it to level 1 - No sound then. If I drop the sound onto the stage and try to loop it it sounds like garbage and has a skip berfore it starts again it just is not a nice smooth loop. When I had tested the load sound locally it worked fine but when I put it up to web it asks me where I want to save the file to not allowing me to control it. Wheew I'm lost and am going in circles with hopes of each idea being a solution only to get very fustrated every time.

LoadSound
When using loadSound with an .mp3 in the same directory as the fla, I am able to hear the .mp3 in the test movie of Flash. However, when I publish it to Dreamweaver, I can only hear the .mp3 if I additionally add the .mp3 to the root directory. If the .mp3 is not in both the fla's directory and the root directory, the .mp3 does not play in Dreamweaver or for that matter, the web. Also, if I bury the .mp3 just one folder deep in the fla's directory, the .mp3 does not play regardless, even though it plays in the test movie of the Flash environment.

Using LoadSound And Paths
I'm making a CD-ROM with SWF's in one folder, and the MP3 files in a subfolder called "sound". Hence:
[swffolder] - contains SWF's
+[sound] - contains MP3's

I'm using loadSound, but the path I'm specifying doesn't work:

mySound.loadSound("/sound/test.mp3", false);

Is there any way to specify the URL as a path to a relative subfolder, without having to specify the whole path starting at the root?

Thanks!

LoadSound Problem
Hi - can anyone tell me why I can't hear anything when I use this code please?
I can see the trace but there is no value for the amount of bytes loaded either - and yes 1.mp3 is in the right directory and it's 6k in size.

Thanx!

soundSpace = new Sound(_root.wordSound);
soundSpace.loadSound("1.mp3",false);
soundSpace.onLoad = doSound();
function doSound (){
var bite = soundSpace.getBytesLoaded();
trace("bite:" + bite);
soundSpace.start();
}

LoadSound For An MP3 Stream
Hi - I have a script which loads an MP3 stream off a Shoutcast server that plays it fine when I run it in the Flash Player, but won't work at all in the browser. I have the latest version of the plugin.

Any ideas?

Thanks.

LoadSound And Start()
hi all i'm using the loadSound feature and i can load a streaming sound (laodSound(file, true)....now i can't use the start function to set an offset , trying to have a forward or backward...any suggestions about it ?

tnk u all in advance, mitch

LoadSound And Framerate ?
Hey everybody, heres a fun one. I have a loadSound function that works great on a IE6 PC. If I run it on a IE 5.1 MAC it doesn't work properly. On a PC the sound loads, the volume gets set to 0 and the sound stops.
On a MAC, every sound I have in the movie(event and streaming) get stopped. The only sounds that play are sound inside of buttons.
Basically what is suppose to happen is, after the intro plays the site loads up and plays the 1st song in the jukebox. My framerate is at 60fps. Could that be too fast for the function to work correctly on a MAC?
Heres the test link:
http://www.theanglephotography.com/index_test.html


function loadMusic() {
myMusic = new Sound();
myMusic.loadSound("track1.mp3", true);
myMusic.setVolume(0);
myMusic.stop();
}

Any ideas out there? I'm ready to pull my hair out with a friggin pair of pliers!

Thanks

Stop LoadSound
I'm loading sounds with:

mySound.loadSound(filename,true);

I'm currently creating these MCs that have the sound object and the file it's trying to load... each clip has it's own loading indicator exhibited as a bar that scales according to the percentage loaded...

If I click on another one of these movie clips I would like to stop any currently playing sounds and stop the buffering process of the loadSound... can I do this or will the full sound load once I call the loadSound?

Thanks in advance,
JH

LoadSound() Network URL
I need to loadSound from a Network URL.. I don't think this can be done...

example of a network url

\servername est est est.mp3


bgSound.loadSound("\servername est est est.mp3 ", true);

That failes it tries to find

file://mypath/\servername est est est.mp3 which obviously isn;t there...

I need it to look for \servername est est est.mp3 only

Then it will find the file...

Please help so I dont have to consider using PHP to move the file onto the same server as this would be sooo time consuming..

Thanks
Nathan

LoadSound Not Working
I'm trying to loadSound into my .swf! Everything works when I test the movie with the flash player, but I soon as I embed it into a page the sound doesn't play!
The sounds, the .swf, and the page are in the same folder on the server!
Frame 1:
thissound = new Sound();
thissound.loadSound ("http://asp.inexo.com:81/foundation/media/Boyd2.mp3", flase);

Frame 22:
thissound.start();


Thanks....

LoadSound Is Not Working In PPC?
I am uploading mp3 file using the following code in the flash, which is working perfectly fine in desktop PC what not in PPC. Can anyone tell me is there anything wrong with the code? or PPC player?


ActionScript Flash:
soundObj = new Sound();
soundObj.loadSound("1.mp3",false);

soundObj.start();

plugin version is 6,0,81,0

Does preloader make any effect in playing sound when playing locally.

MP3 file is in the same directory where the swf file is.
When i embed the same mp3 file in the swf file it plays. But when i use the loadSound method it doesn't.

Thanks,
Vivek

A Loadsound Problem :/
Hi, I have been having some trouble with getting a loader to work right with loadsound. I have read and re-read many tutorials on the site, as well as searched the forums for some answers, but I haven't found anything that is helping me, may also be because i'm not very good at actionscript yet. Anyways figured I would ask for some help, first off i'm using flash mx 6.0, the flash I have made contains a simple preloader on one scene which waits until all frames are loaded before proceeding, this one works perfectly. on the scene which contains the actual animations etc.. it is just an audio player. what I am trying to have it do is after the user clicks on the Play button it will fade out then the text "loading" will fade in and will then load an external mp3, once finished it will fade out and the song will play, along with an animation in the background. This is where my problem is.. I think. I say I think because the flash "seems" to work for me, but then I think it does so since I already have the mp3 file. Here is the actionscript I have tried which seems to semi-work:

code: stop();
myTune.loadSound("tune.mp3");
myTuneBytesTotal = _root.myTune.getBytesTotal()
myTuneBytesLoaded = _root.myTune.getBytesLoaded()
if (myTuneBytesLoaded = myTuneBytesTotal) {
myTune.start()
gotoAndPlay(17);
} else {
play();
}


what I am trying to have it do is on frame 15 it will stop then determine if the bytesloaded equals the bytestotal, if it does it will skip to and play frame 17, however if it doesn't it will continue to play to frame 16 which contains a gottoandstop to frame 15 to loop it until it finishes loading the mp3. I have uploaded the flash to my ftp space, when I visit the url, when I first hit the play button it went to the loader, then went into the animation, and no audio was played. However when playing through it a second time it went to the loader played the audio and played the animation. Others have tried to use it, but they all tell me it doesn't load the audio or animation. Sorry for blabbing so much, but any help is much appreciated.

edit: Oops forgot to add a url to the flash using the above actionscript: link

-B.B.

MySound.loadSound()
Is there a way to delay the playing of an mp3 file being loaded using the loadSound()?

here is part of my code:

_global.goAudio = function() {
mySound = new Sound();
//static value to set volume. will come from session setup page
mySound.setVolume(100);
mySound.loadSound(_global.fpath+_global.audFile, true);
mySound.onSoundComplete = nextAudio;
mySound.start();
};

onSoundComplete I'm calling another function that iterates over an array holding mp3 file names so as to play the next file in the array. They play just fine, but I want a bit of a delay before the play. Can anyone help?

Thank you,

LoadSound() Works In .fla But Not In .as
I've run across a problem loading mp3 files into a sound object. This code works when placed on the timeline directly:


Code:
trace("loading audio");
var s:Sound = new Sound();
s.onLoad = function(success) {
if (success) {
trace("got it");
} else {
trace("error");
}
};
s.loadSound("audio/Sulk.mp3",true);


Output window:

Code:
got it


The audio starts, everything is cool.. I can't build my app like this though, needs to be AS2. So, I make a simple class to do the above:

Class:

Code:
class AudioTest {
// prop
var s:Sound;

// const
function AudioTest() {
trace("birth: AudioTest");
loadAudio();

}

// loader method
public function loadAudio():Void {
trace("loading audio");
var s:Sound = new Sound();
s.onLoad = function(success) {
if (success) {
trace("got it");
} else {
trace("error");
}
};
s.loadSound("audio/Sulk.mp3",true);
}
}


FLA:

Code:
var pleasework:AudioTest = new AudioTest();


Output window:

Code:
birth: AudioTest
loading audio


I get nothing else. Audio doesn't load, I don't even get a trace statement in the output from my onLoad function. Now here's the wierd thing: If I intentionally point the loader to a file that doesn't exist:


Code:
s.loadSound("nosuchfile.mp3",true);


I get this for output:


Code:
birth: AudioTest
loading audio
error
Error opening URL "file:///Macintosh%20HD/Users/aaron/Desktop/podcastplayer/Build/nosuchfile.mp3"


So it knows when it fails, but gives me nothing when I direct it to the correct path/file. So why can I load an mp3 into a sound object via code in the .fla, but not in a class? What gives!??

LoadSound On Mac Won't Play
I am using Flash MX 2004 Professional on a dual G5 Mac running OS X. I have tried loadSound with several mp3 files and it refuses to play. Whether I used loadSound("x.mp3",true) or loadSound("x.mp3",false) it simply will not play. I have controls to stop and start the sound, and I use onLoad and onID3 to display information regarding the load. It appears the file loads successfully (both locally and from a web server)...but the music...simply...will...not...play. If I replace loadSound with attachSound to play an embedded file, it works fine.

What could possibly be wrong?

Using LoadSound (how Much Has Loaded)
I have a bunch of sounds I am loading at the beginning of a flash movie, looking something like this:

stop();
// create a new Sound object
var my_sound:Sound = new Sound();

var sound1:Sound = new Sound();
var sound2:Sound = new Sound();
var sound3:Sound = new Sound();
var sound4:Sound = new Sound();
var sound5:Sound = new Sound();

sound5.onLoad = function(success:Boolean) {
if (success) {
my_sound = sound5;
gotoAndPlay(2);
}
};

// load the sounds
sound1.loadSound("sound1.mp3", false);
sound2.loadSound("sound2.mp3", false);
sound3.loadSound("sound3.mp3", false);
sound4.loadSound("sound4.mp3", false);
sound5.loadSound("sound5.mp3", false);

Basically, what I plan to do with these sounds is switch between them as the user chooses an option from a combo box (its a little more complicated than that so I can't just load the sounds while compiling and have them published with the movie...also there's security reasons as well...).

What I want to know is, will the five commands at the end execute in order? That is, will the command "sound2.loadSound("sound2.mp3", false);" wait until the command "sound1.loadSound("sound1.mp3", false);" is done before it loads, so that my movie will only go to frame 2 when ALL the sounds are loaded?

My second questions is, is there any way I can determine how much of each sound has loaded, so that I can tell the user the percentage of data that has loaded, rather than just a simple "Loading Sounds...Please Wait"?

thnx

Synchronization Using LoadSound()
Alright, I seem to have worked myself in to a bad, bad situation here.

I made about a 30 minute combined video/audio demo for a website. The audio came to me in only a few pieces and we have no audio editing equipment here, nor were we willing to purchase any. So, what I did was let Flash stop and start an audio file according to where it was on the timeline.

Being a programmer and not a designer (dont ask me why I was put to work on this, I'm not too happy about it) I lacked the foresight on what Flash can and cannot do. So, while I now know how I should have done it, that is of no use to me. It's due, now, and I need to know if there's any way to salvage what I have or if I'm going to be here until 4am making it right.

What I did:
I originally had everything timelined out so that I could import the sound file and drag a few frames here and there to sync it up and be done with it. However, it turned out that the sound in no way matched the script I was given in order to build the video. (I was making the video while the actor was in the sound studio). So, I just started over.

I wrote a function (something programmers are supposed to do) that pauses the timeline x-seconds at a time so that if something came up, I wouldn't have to play the keyframe dragging game again. I also didn't import the .mp3 file because it is also possible that they may want to listen to the tutorial and not see it. Having the .mp3 imported into the .exe/.swf and also local on the disk took up too much space, so I decided to kill two birds with one stone and use loadSound, setting the isStreaming property to "true" so that synchronization can be obtained (it is my understanding that Flash will drop frames as needed in order to match the sound)

I also had to do some stopping/starting at specific locations to edit out some words, etc. 3 weeks into the project and I get the files on the CD. Synchronization is lost. Why, and how can I fix this QUICKLY. I know I can brute force it, but that's something I would have had to start 3 weeks ago in order to meet a deadline.

I need a way to guarntee accuracy on different machines using loadSound with streaming set to true, while being able to start and stop at specific locations.

LoadSound LOADING
Hi everone
I'm using loadSound to load an external mp3. This works fine, but:

I am aware of, that to play this mp3, flash needs to load the 5 first seconds before playing (I think 5 is the default value, how do I change this by the way). I wold like to let the viewer know, that Flash is loading. What would be the cleverest way to do this?

Hope you have a sugestion,
Lars

LoadSound Problem
Hi, I am new to flash actionscript.
Is there a way for me to the load the sound in onEnterFrame?

e.g. onEnterFrame = function(){
if(gameEnded){
sound.loadSound("clapping.mp3",1);
}
}

I try to use codes that is similar to this example but the sound did not appear at all. Does anyone know how to solve the problem? Please help

[F8] Kill LoadSound
Hi,
I am creating an mp3 player which loads and plays mp3s dynamically. When you select an mp3 to loadSound() is invoked to load and play it. Problems seem to arise when selecting a new mp3 before the current one has finished loading ie it I can't seem to completely stop a loadSound once its started (I've even tried placing the sound in a movieclip and deleting it with no success).

The code I'm running each time an mp3 is selected is:
//kill off current sound
music.stop();
stopAllSounds();

//load new sound
music=new Sound();
music.loadSound(mp3, true);
music.start(0,1);
If anyone knows a good way of stopping the current load sound please let me know

Thanks
Robin.

[F8] LoadSound Problem
I'm creating a flash mp3 player that loads a playlist and plays the songs. The listing works fine, and it goes to the next song when the current song completes, but I noticed that it stops the song half way through and restarts it. It then plays through perfectly and goes on to the next. If anyone can help me out with this, It would be much appreciated.

Test it and see if you get the same results:
my mp3 player

Here's the code I'm using to play the songs:


Code:
_global.nextSong =function () {
snd.stop();
var p = _root.playlist;
if (p.selectedIndex == p.length - 1) { p.selectedIndex = 0; }
else { p.selectedIndex = p.selectedIndex + 1; }
playSong(displayUpd(p.selectedIndex));
}

_global.playSong=function (song) {

_global.snd = new Sound();
snd.onLoad = function (success:Boolean) {
if (success) {
snd.start();
snd.onSoundComplete = function () { nextSong(); }
}
else {
trace('ERROR: Unable to load song');
nextSong();
}
}
snd.loadSound(song, true);
}

[CS3] Problem With LoadSound
I would like to simply stream an mp3. I have found a bunch of tutorials that all say the same thing:

mySound = new Sound();
mySound.loadSound("song1.mp3", true);
mySound.start(0, 5);

But I dont hear a thing. I have even tried uploading the files and I still dont hear anything. What am I missing? thanks
Dan

[CS3] LoadSound Truncates Mp3
I have my sounds load like this:
_root.bgmusic.loadSound("bgsound/home.mp3", true);

and they each only play for 20 or 30 seconds although they are really a few minutes each. Any ideas? thanks
Dan

Copyright © 2005-08 www.BigResource.com, All rights reserved