[quoted text, click to view] > Sorry, I am very new to Flash. The mp3 is 260K, the WAV
> when i converted it was like 2.6 megs (no way)
Flash will reduce that 2.6 MB to a surprisingly small number. I
wouldn't be surprised at all if Flash compresses your WAV down to the same
size as a comparable MP3.
[quoted text, click to view] > and i know the Flash movie that i got this from whicj works
> fine is using an MP3(same file).
As Patrick concurred, the nature of the MP3 file format simply makes
this an almost impossibility. One could argue, based on the nature of the
music's rhythm, that the proper coincidence of "chunks" and timing is
possible, but very, very unlikely. It may be that the MP3 timing issue is
decreased or avoided when MP3s are imported by hand directly into the FLA
.... maybe that's it.
[quoted text, click to view] > This is the code in my AS file which i kind of understand. What
> would i have to do to accomlish what you suggest?
If you're doing what I suggest, you'll start a brand new FLA and import
the MP3 or WAV file into that. The only thing in this new FLA will be your
embedded audio file, which you'll drag to frame 1 of the main timeline and
set to loop 999 times in the Properties inspector, or use the ActionScript I
posted earlier. Then you'll publish that FLA into a SWF, fiddling with the
Publish settings to get the file size down as small as possible while trying
to retain as much audio quality as you can.
Then you'll load this SWF via ActionScript into your main FLA, rather
than loading an MP3.
[quoted text, click to view] > I guess i actually do not mind the mp3 in my SWF if it does
> not hold the entire movie from starting until it loads.
Experiment with it. If you import directly into your existing FLA, you
may find that you can live with the increased file size. I think you're not
seeing it yet that importing a WAV won't hurt your FLA. Even if the WAV is
several megs, your SWF won't be, unless you don't compress the audio. In
comparison, it is standard practise to import graphics as non-compressed
BMPs (which can be huge), then rely on Flash's JPEG compression to decreased
the file size of the SWF.
[quoted text, click to view] > // Loader
> audio.trackName=currNode.attributes.SRC;
> audio.stopped=false;
> audio.snd=new Sound();
> audio.snd.loadSound(audio.trackName);
> audio.state=1;
> audio.tween("_alpha",0,0.3,mylinear,0);
> intHolder.snd=setInterval(preloadSnd,50);
Of the above code, two lines are almost identical to what I posted
earlier ...
audio.snd = new Sound();
audio.snd.loadSound(audio.trackName);
Those are the only two that have anything to do with loading sound. The
rest is all graphics. I don't know where you found this code, but it will
help you tremendously to fully understand it. :) Start with the basics in
a brand new FLA -- just to avoid the clutter of what's already in your
existing FLA -- check out the "Sound class" entry in the ActionScript
Language Reference (F1 key), and dive in. There are examples galore, and
you'll thank yourself to starting with the unadorned fundamental building
blocks first.
David
stiller (at) quip (dot) net
"Luck is the residue of good design."