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




Preloading Sound In Html



Hi,
I have a sound file that I've embedded into my html page. Is there any way to make it load first and then it shud forward to the main page and start playing. ie there shud be like a sound preloader. I dont want this in flash, perhaps a javascript?> Pls help, any reply gr8ly appreciated.



FlashKit > Flash Help > Flash General Help
Posted on: 01-02-2003, 01:33 PM


View Complete Forum Thread with Replies

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

Preloading Sound
hello
I'm wondering Why is it that when I put a preload scene in front of a scene that contains sound my file size resides in preload scene 1 so I never get to see the preload cause once frame one is loaded the whole file is
please help
thanks

Preloading Without Sound ?
I have a main movie with sound wich loop in the end, before the loop start I have sevral loadmovie actions
loading additionals movies also with sound. How can I make these additionals movies load without hearing their sounds in the background ?

Preloading Sound Only
hi all,

at the moment i have a preloader that uses a bytes counter. this is so i may employ the use of a perscentage bar/counter. this is of course counting the full 100% of bytes.

however, preferably i would like it to just preload the sound (and maybe images), for it is the sound/images that are taking up the greater percentage of the file size. my original solution was to dump all offending file hoggers on the first frame, preload that frame, then skip it and move on once loaded. however this isn't satisfactory for i can't see a bytes counter working with that - or maybe it can, u tell me

danke
b

Preloading Sound
Ok, much like preloading instances for quicker playback, I figured I could copy sound and place it into its own scene to be checked by preloader to see if it is loaded, but problem is It sits on 0% and then 100% as soon as it loads apparently. I have preloader which loads graphic in 4 stages for sound in quarters 25 50 75 100. I just used if frames loaded command for it, but I guess this doesnt work? Any ideas- I figure if I have sound streaming though I dont need preloader. am I right>?

Preloading Sound? Plz Help...
I am loading a 150kb sound loop into my movie at the start. The loop sits in its own SWF, so how can I have the main movie not start until the music movie has preloaded? Make sense?

Preloading Sound
Can anyone help me learn to preload sound?

Sound Preloading
I am dynamically loading an mp3.

I have a preloader, that uses a bar to show the progress.

this set of actions starts when the file is loaded, and loops until the file is completely loaded:

_parent.loadbar._xscale = _parent.MyMusicMC.myMusic.getBytesLoaded()/_parent.MyMusicMC.myMusic.getBytesTotal()) * 100;
if(_parent.MyMusicMC.myMusic.getBytesLoaded()/_parent.MyMusicMC.myMusic.getBytesTotal() >= 1){
_parent.MyMusicMC.MyMusic.start();
_parent.jukebox.playstop.gotoAndStop(1);
_parent.loadbar._xscale = 0;
_parent.lbaa.removeMovieClip();
}

The loadbar's size should be linked to the progress of the download. This worked offline, but when I checked it online.. it did not.

So I had it display the values for:
_parent.MyMusicMC.myMusic.getBytesLoaded
and
_parent.MyMusicMC.myMusic.getBytesTotal

Online Total equalled nothing and loaded equalled 0.
Offline they equaled a large number representing the actual data.

Does anyone have any idea what I should do?

Thanks!
Max

Preloading Sound?
how do i preload a sound that is being exported for actionscript?

i have an action clip with this code:

onClipEvent (load) {
currentSong = new Sound(_level11);
currentSong.attachSound("song");
total = int(currentSong.getBytesTotal());
trace(total);
}

but the trace function keeps returning 0.

what's the proper way to do this? i've also tried doing:
total = int(_level11.currentSong.getBytesTotal());

with the same lack of results.

Preloading With Sound
I attached sound to a flash game I am developing using the attachSound() function, it's not streaming. When my game loads in a browser, the preloader does not appear until the sound has loaded first is there a way I can work around this problem? It has been suggested to me that I could use loadSound() but that is not an option for me as I don't want to waste the extra bandwidth.

Preloading Sound
hello,

ive used this tutorial to link up sounds to my website.

http://www.flashkit.com/tutorials/Au...-824/index.php

but running into problems when i set up a preloader.

because all the sound files load into the cache before the preloader is activated. the browser has to stare at a blank screen for a while, then is flashes 100%, and runs .

is there any solution to this problem>?

thanks,
jboom

Preloading Sound?
Im trying to preload my flash site, I already have a preloader script which I know works in flash MX 2004 as I have tested it on some other sites. However on this new site I use a lot of sound which is attached to movie clips and exported for actionscript in the first frame...

when you go onto the site you dont see the preloader, wait for 5 minutes (on 56k) and then the whole site loads up.

I think because all the sound is exported flash loads it before the preloader?? anyone know a way around this or am I miles of track?

you can check out the site here

Sound Gone After Preloading?
Hi,

I'm preloading the frames of my flash movie in the first frame, after UN-checking the 'export in first frame' from all the sounds in the library and assigning the AS Classes to export into frame 2 in 'Publish Settings' - my sounds appears have vanished for some reason....

Any help would be great....

Here's the code for the sound object (on frame 3 of the movie - beginning of the movie)

_root.createEmptyMovieClip("soundHolder0_mc", 1);
_root.createEmptyMovieClip("soundHolder1_mc", 2);
_root.createEmptyMovieClip("soundHolder2_mc", 3);

mySound1_sound = new Sound(soundHolder0_mc);
mySound2_sound = new Sound(soundHolder1_mc);
mySound3_sound = new Sound(soundHolder2_mc);

// attach sounds
mySound1_sound.attachSound("housesound");
mySound2_sound.attachSound("walking");
mySound3_sound.attachSound("mousey");

// loop sounds
mySound1_sound.start(0, 100);
mySound2_sound.start(2, 100);

// set volume
mySound1_sound.setVolume(25);
mySound2_sound.setVolume(100);

Thanks

Preloading Sound?
Im trying to preload my flash site, I already have a preloader script which I know works in flash MX 2004 as I have tested it on some other sites. However on this new site I use a lot of sound which is attached to movie clips and exported for actionscript in the first frame...

when you go onto the site you dont see the preloader, wait for 5 minutes (on 56k) and then the whole site loads up.

I think because all the sound is exported flash loads it before the preloader?? anyone know a way around this or am I miles of track?

you can check out the site here

Preloading Sound
Hey, I'm usig the following action to do sound:

scene02

firstSound=new Sound();
firstSound.attachSound("trance");

in the same scene I got this button:

on (release) {_root.firstSound.start()

..very simple!

in scene01 I've made a preloader:

if(_framesloaded == _totalframes){
nextScene ();
play ();
}

else {
loaded = Math.round(getBytesLoaded()/1024);
total = Math.round(getBytesTotal()/1024);
percent = Math.round((loaded/total)*100)+"%";
bytes = loaded+"kb loaded";
}

BUT this don't work with sound!! WHY?.. it works with any other movie..

Sound During The Preloading
i use lee's tutorial for the basic flaxh preloader and i want to put a mp3 while it loads. more pecisely, i want the mp3 to stop when the file is loaded.
thanks

Preloading XML/HTML...
Allright, here's something for you die-hard coders.......

I'm able to make a .swf with a textfield that dynamically loads html files by using xml.
It has buttons so you can change the contents of the textfield with a different html-page.

This works fine, but it looks kinda static....

If seen a tutorial which preloads external .swf's and has an animation, but does anyone know if this is possible with external html's? Because you can't use the bytesloaded function for html pages.

The tutorial is here: http://www.kirupa.com/developer/mx/p...transition.htm

[edit]I almost forgot to post the files!! Click here
to get them.
This zip contains the html files, the fla and the swf and a css[/edit]

Preloading XML/HTML...
Allright, here's something for you die-hard coders.......

I'm able to make a .swf with a textfield that dynamically loads html files by using xml.
It has buttons so you can change the contents of the textfield with a different html-page.

This works fine, but it looks kinda static....

If seen a tutorial which preloads external .swf's and has an animation, but does anyone know if this is possible with external html's? Because you can't use the bytesloaded function for html pages.

The tutorial is here: http://www.kirupa.com/developer/mx/p...transition.htm

[edit]I almost forgot to post the files!! Click here
to get them.
This zip contains the html files, the fla and the swf and a css[/edit]

Preloading Swf With Html
hello,
I am not looking for a typical preloader here. I want the html page to load the swf as part of loading the html page. Basically I am using thickbox to load an html page that holds flash content. Thickbox comes with a neat loading animation that typically runs while large images or other heavy content loads. The problem is that the page that is loading is very light (it only holds the embed object) so the thickbox animation never show and the box opens, but then there is a small lag while waiting for the swf to download. I want the thickbox animation to run until the flash is downloaded, which i can't figure out how to do.
You can see what I mean by going hereand clicking on the watch video link in the first content box.

Of course, if I could load the flash directly into the thickbox, that would be an even better solution.

Thanks for any help.

Preloading Images And Sound
I have built a preloader into my flash 5 movie.. it preloads using the "if frame is loaded" code. Once the movie starts it plays pretty slow because i have alot of images in the movie but when it goes around and plays the second time it plays at normal fast speed. How do you preload the images so when it plays it plays fast the first time. The images are called up from the library into the scene.. thank you..

Preloading Sound Objects
i have sound objects in a flash 5 movie that are loading before my preloading routine. the movie is structured as follows:

i have a background image on frame 1.
the preloader starts on frame 2.
on frame 3, i have mySound=new sound ();
on various buttons in the movie, i have mySound.attachsound ("loop"); mySound.start("",999);
(where loop has been linked to object in the library)

given that the sound files are the bulk of the movie, this problem renders the preloader redundant (it finally kicks in at 80% loaded).

any help greatly appreciated.

yjk

Preloading External Sound .swf
problem:

i'm trying to preload an external .swf whose only content are sound files linked as objects. in preview-movie, the sound files load perfectly into my empty mc on the main movie (i can fully modify all the linked sound objects from the main timeline). but when i test the movie on the internet, it blows through the preloader and my sound files are not playing. (it does so as well when simulating streaming under test-movie but i figured that was normal -- am i wrong? i am still able to access the sound objects.)

assuming the sound file is still loading in the background (ie, the preloader didn't catch), even if i wait for quite some time (~150k sound file on 56k dial up), still no sound.

theory:

the sound files are being pulled correctly into the mc-holder (instance named "noise") since i am able to call on these objects from the main movie. i believe its the preloading structure i have setup which is faulty.

frame structure / action scripts:

------------

//on frame 2 i have just the following action which defines the "preload" function used by the empty mc ("noise") on the main timeline...

function preload (theClip) {

if (!theClip.doneLoading) {
if (theClip._framesloaded>0 && theClip._framesloaded == theClip._totalframes) {
theClip.doneLoading = true;
}

//define variables
noiseLoaded = Math.round(theClip.getBytesLoaded()/1024);
noiseTotal = Math.round(theClip.getBytesTotal()/1024);
noisePerc = Math.round((noiseLoaded/noiseTotal)*100);

//define status outputs
nbytesOut = noiseLoaded+" kb of "+noiseTotal+" kb";
npercOut = noisePerc+"% loaded";
noiseBar._width = noiseBarHousing._width*(noisePerc/100);

//if not done loading, go back
_parent.gotoAndPlay (Number(3));

}

//if done loading, play on
_parent.gotoAndPlay (Number(6));

}

-------------

//on frame 3 i have the following action to tell "noise" to loadMovie (as well as the empty "noise" mc, loadbar, status boxes below this action script layer)...

noise.loadMovie("flash/noise.swf");

//on the "noise" mc i have the following action attached on the clip (not in the frames of the clip) (this mc has nothing in its frames - just all my sounds which have been linked as objects through the library)...

onClipEvent (enterFrame) {
if (this._url != _root._url) {
_root.preload(this);
}
}

--------------

//on frame 7 i define the various linked sound objects which should now reside in the "noise" mc (as well as start one of them)...

noise.loopStart = new Sound(noise);
noise.loopStart.attachSound("loopStart");

noise.loopBio = new Sound(noise);
noise.loopBio.attachSound("loopBio");

noise.loopStylings = new Sound (noise);
noise.loopStylings.attachSound("loopStylings");

noise.loopXperim = new Sound (noise);
noise.loopXperim.attachSound("loopXperim");

noise.loopStart.start("",999);
noise.loopStart.setVolume(50);

---------------

this has been driving me up the wall. exactly 24 hours ago, i was just beginning to learn about the pain that is preloading sound objects and i am sooooo close. please help before i throw this computer out the window.


young.frustrated.as.hell.jedi.knight

Preloading External Sound .swf
problem:

i'm trying to preload an external .swf whose only content are sound files linked as objects. in preview-movie, the sound files load perfectly into my empty mc on the main movie (i can fully modify all the linked sound objects from the main timeline). but when i test the movie on the internet, it blows through the preloader and my sound files are not playing. (it does so as well when simulating streaming under test-movie but i figured that was normal -- am i wrong? i am still able to access the sound objects.)

assuming the sound file is still loading in the background (ie, the preloader didn't catch), even if i wait for quite some time (~150k sound file on 56k dial up), still no sound.

theory:

the sound files are being pulled correctly into the mc-holder (instance named "noise") since i am able to call on these objects from the main movie. i believe its the preloading structure i have setup which is faulty.

frame structure / action scripts:

------------

//on frame 2 i have just the following action which defines the "preload" function used by the empty mc ("noise") on the main timeline...

function preload (theClip) {

if (!theClip.doneLoading) {
if (theClip._framesloaded>0 && theClip._framesloaded == theClip._totalframes) {
theClip.doneLoading = true;
}

//define variables
noiseLoaded = Math.round(theClip.getBytesLoaded()/1024);
noiseTotal = Math.round(theClip.getBytesTotal()/1024);
noisePerc = Math.round((noiseLoaded/noiseTotal)*100);

//define status outputs
nbytesOut = noiseLoaded+" kb of "+noiseTotal+" kb";
npercOut = noisePerc+"% loaded";
noiseBar._width = noiseBarHousing._width*(noisePerc/100);

//if not done loading, go back
_parent.gotoAndPlay (Number(3));

}

//if done loading, play on
_parent.gotoAndPlay (Number(6));

}

-------------

//on frame 3 i have the following action to tell "noise" to loadMovie (as well as the empty "noise" mc, loadbar, status boxes below this action script layer)...

noise.loadMovie("flash/noise.swf");

//on the "noise" mc i have the following action attached on the clip (not in the frames of the clip) (this mc has nothing in its frames - just all my sounds which have been linked as objects through the library)...

onClipEvent (enterFrame) {
if (this._url != _root._url) {
_root.preload(this);
}
}

--------------

//on frame 7 i define the various linked sound objects which should now reside in the "noise" mc (as well as start one of them)...

noise.loopStart = new Sound(noise);
noise.loopStart.attachSound("loopStart");

noise.loopBio = new Sound(noise);
noise.loopBio.attachSound("loopBio");

noise.loopStylings = new Sound (noise);
noise.loopStylings.attachSound("loopStylings");

noise.loopXperim = new Sound (noise);
noise.loopXperim.attachSound("loopXperim");

noise.loopStart.start("",999);
noise.loopStart.setVolume(50);

---------------

this has been driving me up the wall. exactly 24 hours ago, i was just beginning to learn about the pain that is preloading sound objects and i am sooooo close. please help before i throw this computer out the window.


young.frustrated.as.hell.jedi.knight



ps - i had posted this on the 'newbie' section and was suggested to post it here. apologies if this appears to be 'spamming.'

Sound Object Preloading
ok - i have an swf with a sound object (loop) that loads and plays called sound.swf. now i've heard that the best way to play this is keep it in an external swf and load it into your movie cos the sound object loads befor ethe first frame of the movie.

ok, so ive done that, but the sound doesnt play once its loaded into the movie clip. the sound.swf plays on its own, but doesnt when loaded into the main clip. is it something to do with the referencing?

this is driving me mad. any tutorials specifically on sound object preloading?

sid

Preloading Sound Problem
Hello,
I am trying to preload my movie, and I am having the following problem. I am using the attach sound action script, and it is forcing me to export the mp3 on the first frame. However, it is causing my preloader movie clip not to show up until 128k is loaded. Could someone tell me how to correct this? Thank you so much.

Sound Control/preloading
Hi Guys, I am having trouble controlling sound, I made a volume control, but i would prefer it to start the sound at zero, so when the user desires she/he can bring up by themselves. This is probably simple, but i can't figure it out.

My next question concerns with preloading in flash mx, if any knows where i can get a nice and simple preloader tutorial, please direct me to it.

Lastly, I am considering on purchasing 3d studio max 4 book and flash mx, which ones would you reccomend?

Thanks and Have a nice one!

Preloading Sound From External SWF
How do some people preload their background loops before the main movie begins? I have several swf's, one for the main page, each content page, and one for the sound loop. I have a preloader set up for the main movie, but I would like to have the main movie begin after preloading both the main movie and the music. Any suggestions?

Preloading Sound Objects?
I am using a lot of sound objects in a new project and it is mucking up my pre-loader. What happens is that the sounds are loading in frame 1 even before the preloader graphics appear on the screen, so that by the time the preloader appears on the screen the movie is about 75% loaded already.

I know that I can load the sounds in as another swf using "load movie", but that's pretty impractical in this instance. Any other ideas would be greatly appreciated.

Thanks.

Preloading And The Sound Object
preloader which is otherwise fine does not work at all when i am using sound, that is i have a sound(mp3 5.5mb) in the library and it's exported for actionscript to make a new sound object but it isn't actually on the stage, to my knowledge that is why it's failing.

at the moment in frame one of the external 'track' swf

onClipEvent (load) {
total = _root.getBytesTotal();
this._xscale = 0;
}

onClipEvent (enterFrame) {
bytes = _root.getBytesLoaded();
amount = bytes/total;
percent = int(100*amount);
this._xscale = percent;

if(amount>= 1.0) {
_root.gotoAndStop("complete");
}




// then in the 'complete' frame

stop();

ss = new Sound();
ss.attachSound("track");

offSet = 0;
playing = "no";






? is it becuase the sound isn't actually on the stage

Preloading Sound Loops...
I'm just wondering how to load sound objects on a specific frame. I have a little animation before my preloader, so loading the sounds on the first frame of the movie doesn't work. But I'd like to get the sounds loaded before the preloader. Any help would be appreciated!

Sound Preloading Probs.
I am dynamically loading an mp3.

I have a preloader, that uses a bar to show the progress.

this set of actions starts when the file is loaded, and loops until the file is completely loaded:

_parent.loadbar._xscale = _parent.MyMusicMC.myMusic.getBytesLoaded()/_parent.MyMusicMC.myMusic.getBytesTotal()) * 100;
if(_parent.MyMusicMC.myMusic.getBytesLoaded()/_parent.MyMusicMC.myMusic.getBytesTotal() >= 1){
_parent.MyMusicMC.MyMusic.start();
_parent.jukebox.playstop.gotoAndStop(1);
_parent.loadbar._xscale = 0;
_parent.lbaa.removeMovieClip();
}

The loadbar's size should be linked to the progress of the download. This worked offline, but when I checked it online.. it did not.

So I had it display the values for:
_parent.MyMusicMC.myMusic.getBytesLoaded
and
_parent.MyMusicMC.myMusic.getBytesTotal

Online Total equalled nothing and loaded equalled 0.
Offline they equaled a large number representing the actual data.

Does anyone have any idea what I should do?

Thanks!
Max

Sound Preloading Problems
I am dynamically loading an mp3.

I have a preloader, that uses a bar to show the progress.

this set of actions starts when the file is loaded, and loops until the file is completely loaded:

_parent.loadbar._xscale = _parent.MyMusicMC.myMusic.getBytesLoaded()/_parent.MyMusicMC.myMusic.getBytesTotal()) * 100;
if(_parent.MyMusicMC.myMusic.getBytesLoaded()/_parent.MyMusicMC.myMusic.getBytesTotal() >= 1){
_parent.MyMusicMC.MyMusic.start();
_parent.jukebox.playstop.gotoAndStop(1);
_parent.loadbar._xscale = 0;
_parent.lbaa.removeMovieClip();
}

The loadbar's size should be linked to the progress of the download. This worked offline, but when I checked it online.. it did not.

So I had it display the values for:
_parent.MyMusicMC.myMusic.getBytesLoaded
and
_parent.MyMusicMC.myMusic.getBytesTotal

Online Total equalled nothing and loaded equalled 0.
Offline they equaled a large number representing the actual data.

Does anyone have any idea what I should do?

Thanks!
Max

Preloading Sound Objects
I thought this would work, but no such luck. I'm loading a Sound Object , and I want to start loading another when the first one is loaded.


Code:
mainSound1=new Sound();
mainSound1.loadSound(_root.baseURL+"sound/amon.mp3", true);
mainSound1.start(0,1);

nowPlaying = mainSound1;

bytes_loaded = nowPlaying.getBytesLoaded();
bytes_total = nowPlaying.getBytesTotal();
if (bytes_loaded == bytes_total) {
Function(loadNext);
}
// FUNCTIONS
function loadNext() {
mainSound2=new Sound();
mainSound2.loadSound(_root.baseURL+"sound/djshadow.mp3");
}
function nextSong() {
mainSound2.start(0,1);
nowPlaying = mainSound2;
}
mainSound1.onSoundComplete = Function(nextSong);
stop();
Any ideas???

Preloading Sound Objects
I've working on a site for a composer and I need to play a number of mp3s. I followed this tutorial:

http://www.kennybellew.com/tutorial/...d_multiple.htm

I works pretty nicely, but I'd like to adjust one thing. At present, you click the button once to load the mp3, then you usually need to click the button again at least once (and sometimes a few more times) to get it to start playing. I'd love it if it could just start automatically once it's loaded.

Here are my results:

http://www.timothywilliams.net/flash...reloaders.html

Any ideas? I'm open to a completely different solution...

Thanks!

Julia

Preloading Linked Sound
After making a movie, when you add two or more sounds into it by linking them (By linking the sounds you can add more that one sound and a volume & pan controls), they dont preload with the movie, i.e. the sounds preload before the movie starts loading. I tried to add them in a different & then preloading them, but it doesn't work.
I want it like in www.juxtinteractive.com , only I want the sound to load after the site loads.
HELP

.. Ok OK.. I did go through the sticky thread, but couldn't find what I was looking for .. Or maybe ,

Preloading Sound Really Buggy?
Please could someone advise on this one, cos I spent the entire afternoon on it yesterday and am pretty much on the verge of meltdown. Trying to do such a simple thing - preload some sounds!

After building a multi-movieclip preloader last week I thought it would be easy. However what I've ended up with is code that works sometimes and not others!

I use the Flash built-in simulator to test if the loading bar works or not and although it appears to be progressively loading the sound in, a trace command on getBytesLoaded() it more often than not displays this number as the getBytesTotal - effectively screwing up the loading bar. BUT then, on another occasion it might decide to work properly, getBytesLoaded will progress from 0 etc and the loading bar will work. It seems completely arbitrary and is causing me a severe headache! Have I come up against some sort of bug. Is my code faulty?? It just seems so strange that sometimes it chooses to work and sometimes not. Strange and completely infuriating! I'm using MX2004 by the way, although my coding is always MX. PLEASE HELP!!!

Update:- just tried loading swf in an html window and in the swf player independantly of Flash. Nothing works at all. It can't even seem to get off the first frame. I think that the

ActionScript Code:
this[currentSound].onLoad = function() {
is the problem. I seem to remember that I ran into problems with 'onLoad' before ages ago - someone told me it was buggy or something. I really really do despair!

Code below


ActionScript Code:
stop();
soundArray = new Array(null, "sound1", "sound2", "sound3");
soundNum = 1;
function loadSounds() {
    //
    //
    preloadNow = true;
    this.onEnterFrame = function() {
        mySoundBytesTotal = this[currentSound].getBytesTotal();
        mySoundBytesLoaded = this[currentSound].getBytesLoaded();
        trace(mySoundBytesLoaded);
        //
        //
        //this is a preloader taken from the excellent [url]http://www.kennybellew.com/tutorial/[/url]
        //
        if (preloadNow == true && mySoundBytesLoaded>0) {
            mySoundLoading = Math.round((mySoundBytesLoaded/mySoundBytesTotal)*100);
            if (mySoundLoading == 100) {
                preloadNow = false;
            }
            preloader.percentLoadedText = mySoundLoading+"%";
            preloader.loadBar._xscale = mySoundLoading;
        }
    };
    //
    //
    //
    //
    currentSound = soundArray[soundNum];
    //
    //this progressively loads each sound, stepping through the array
    //
    trace("loading..."+currentSound);
    this[currentSound] = new Sound();
    this[currentSound].loadSound(currentSound+".mp3", false);
    //loads each sound in as an event
    this[currentSound].onLoad = function() {
        trace(currentSound+" loaded");
        checkAllLoaded();
    };
}
function checkAllLoaded() {
    if (soundNum>=soundArray.length-1) {
        this.play();
        //when all sounds loaded, the movie advances and plays the first frame
    } else {
        soundNum++;
        loadSounds();
    }
}
loadSounds();

Preloading Attached Sound
Hello!

Also, I am just beginning. I have read lots of posts with similar problems, however, my preloader is slightly different as it is a separate file altogether.

I have attached a sound on frame 50 of my movie using 'attach sound'.
It plays fine. On my linkage I have ticked 'export on first frame'. When this is not ticked it does not play. So I left it ticked.

My preloader is a seperate .swf that loads the movie that has the sound.
I can tell the sound has loaded as the preloader takes a lot longer. However, when the movie has loaded and begins to play the sound just does not exist. Or it is shy and does not want to talk.

I can't do the thing everyone is suggesting (moving sound to frame 3 and unchecking 'export on first frame', then modifying my preloader script) because my preloader is separate to my movie.

Do any smart flash brains have a suggestion, because I am not yet a smart flash brain. Perhaps I am a couple of brain cells at the moment. Anyway, I would be thrilled to have help in conquering this irritating problem!

Problem Preloading Sound
Hi,
I'm trying to load a Sound file using the loadSound() method. Here is the code i'm using:


Code:

var mySound = new Sound()
mySound.loadSound("NellyFurtado-Powerlessdesiremix128K.mp3", true)

this.onEnterFrame=function(){
if (mySound.getBytesLoaded()<mySound.getBytesTotal()) {

load_txt._visible=1 <-- Dynamic Textbox on Stage
percent=Math.round((mySound.getBytesLoaded()/mySound.getBytesTotal())*100);
load_txt.text = "Loading Audio...."+percent+"%";
} else if (mySound.getBytesLoaded() == mySound.getBytesTotal()) {
load_txt._visible=0
}
}
The dynamic textbox (load_txt) is displaying the loading progress but the sound starts playing after the loading reaches 5%, is it because the sound is getting streamed and that i need to capture the streaming info and not the load info ? Any suggestion is welcomed.

Preloading With Sound Object
how could i preload a sound that im loading with a sound object? id really rather not create a whole other movie clip just to handle preloading for external mp3's. but if thats all i can do... ill do it. but id rather that be my last resort.

ive been told before to take advantage of the "set interval" function in a scenario such as this, but i dont know how to apply it to preloading with a sound object.

am i missing something or is it odd that when loading a sound you cant use "onLoadProgress" but if you load a swf or jpg you CAN? whats so different about a sound file? (thats not my question, just a complaint haha)

Preloading From Other Html Page
Hey,
I've got 2 flash movies, eash in seperate html pages, the second one is quite large. I was wondering if it is possible so that while you are veiwing the first flash movie, the second flash movie in the other html page is loading? Is this possible? I have the flash bible, but it conveniently ignores this.
any help would be rad.
cheers,
chuck.

Preloading Html Website
is it posable to have a pecentage preloader in flash that loads a html website from the flash movie and when loaded it opens the html webpage as a normal website(hope that makes scence)

if there is any way to do this atall please let me know

thanks in advance

Preloading Many Images In Html, Help Please
I am currently using this code to load images

<SCRIPT LANGUAGE="JavaScript">
<!-- hide from none JavaScript Browsers

Image1= new Image(175,50)
Image1.src = "image1.gif"

Image2 = new Image(25,30)
Image2.src = "image2.gif"

Image3 = new Image(125,80)
Image3.src = "image3.gif"

// End Hiding -->
</SCRIPT>

and it works fine accept that I have 50 images to preload
and it takes forever to write the code

There must be a quicke way ie: using css

any suggestions, Please!

Ps. I know this is a flash help forum

Thanks In Advance!

Freshly!

Preloading HTML Document
I have an SWF where I can click on buttons and it loads an HTML document into a textfield. The problem is if it uses any images, they take a while to load. So what happens is you see the text appear, then the images appear as they load and change the layout of the text.

Why question is there a way to make a preloader (Flash 8) for the HTML that it is loading until it can show it all at once?

Preloading Whole Php/html Sites
Hello. Maybe this is a silly question, but I would like to use a preloader for a website I am making. I have never made a preloader before, but the only tutorials I can find are for an XML file or to attach to the start of the swf itself. I want to preload a whole website which has php and flash, therefore I can't just attach it to the movie. I want to just have a preloader on a little splash page and a little progress bar and when it's done, the user has the option to enter page.

I'm sure this is simple, I'm probably just thick.

Preloading Swfs In Swf On Another Html
Hi,
is it posible to have something like this:
index.html with index.swf which is linked to a home.html page. On that home.html page i have 3 swfs and i would like that those 3 swfs are loaded before index.html let me get to home.html page. So i would have a script on index.swf which would cheack when those 3 files are loaded and only than redirect me to home.html page.

thanks for your time.

cheers

Preloading A Movie With Sound Object
hi guys thanks for reading my query. Can u tell me how to preload sound in a movie where the sound is being used as

s= new Sound()
s.attachSound("a")
a.start()

I have tried many methods but the sound just loads in the first frame so no preloader works help i even tried a stupid tutorial on the web to but it was way too complicated to understand plzz help.

thanks harnoor
[Edited by harnoors on 02-09-2002 at 05:18 PM]

Preloading, Sound, Linkage, First Frame
If someone could help me with preloading sound. I know there has been several posts. I have read all of them.

All I can find is to use external .swfs using loadmovie. Can attachsound not be used at all when preloading because of the linkage in the first frame?

Thanks,
Andrea

Preloading Woes. Using Embedded Sound
Hello,
Although I have flash experience, this is my first time using embedded sound, with the library linkage property of "export for actionscript & export in the first frame".

I am just using a simple getBytesloaded/getBytesTotal loader, but exporting all audio on the first frame causes the preloader to fail because the data is before the preloader.

Am I missing something?
Have any ideas?
Is there a better way?
Is a dynamic import of audio a better choice?

Any and all ideas appreciated..
Thanks...
3PRIMATES

Problem: Sound Class Preloading
Here's the situation:

1. main.swf
Contains 6 scenes. 1st is the Preloading scenes, 2nd is a Main scenes, 3rd - 6th is just miscellaneous scenes.

***Note that all works fine. 1st scenes loads and proceed to 2nd Main.


2. music.swf
another swf file for background music looping itself. with controls. Works well itself.


I inserted loadMovieNum("flash/music.swf", 1); into one frame in scene 1 of main.swf. So when played, the music will come out once it finish the preloading.

***Note that main.swf preloading scenes does not preload music.swf. They are different files.

When play on either the Test Movie or Published then HTML, the entire scenes of both .swfs works FINE.


Here's the problem:

When uploaded to my website, the flash preloads all the way, but does not load the music.swf which I incorporated into main.swf.


Suggested Solutions??

Because I am doing a scene to scene change. Making a different swf file just for music to incorporate is essentially the only solution I thought of for the music to loop throughtout the flash event. I couldnt think of another way.

1.
Maybe someone could help me with the preloading in scene 1 of main.swf which will also preload the music.swf file.

Or

2.
Perhaps, a solution that will solve my music loop that function inside main.swf itself instead of a different swf file. main.swf is a scene to scene swf.


Hopefully someone out there has a solution!!

Thanks!!

Sound Wont Start After Preloading
Hi I haver this code to load a song on a button(name stored in songInput)
Code:

myInputSound.loadSound(songInput,false);
//then a preloader loop is called
Loader_mc.gotoAndPlay("loader");
in the preloader I have
Code:
myInputSoundBytesTotal =_parent.myInputSound.getBytesTotal();
myInputSoundBytesLoaded=_parent.myInputSound.getBytesLoaded();

if (_parent.preloadNow==1 && myInputSoundBytesLoaded>0) {
myInputSoundLoading=Math.round((myInputSoundBytesLoaded/myInputSoundBytesTotal)*100);
if (myInputSoundLoading==100) {
_parent.playing=true;
_parent.paused=false;
_parent.stopped=false;
_parent.myInputSound.start(0,0)
_parent.preloadNow=0;
gotoAndStop("loaded");
}
_parent.percentLoadedText=myInputSoundLoading+"%";
problem is the song preloads perfectly, percentage displays, duration appears when loaded, position shows 0, but song does not start playing. If I click the play button again it starts.
I want it to start as soon as it finishes preloading.

I have noticed that if you visit the site again after you have already preloaded the songs and select one they will start immediately.
They also start immediately when testing locally.

any ideas?
mark

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