QA

 < Day Day Up > 

Q&A

Q1:

I placed a long-running sound in the first frame of my movie. However, when I test the movie, the sound only plays for the first few seconds and then repeats. Why?

A1:

You've probably set the Sync setting for the keyframe (on the Properties panel) to Stream and haven't extended the Timeline long enough. If your sound is 10 seconds long and you're playing at 12 fps with Stream selected, you're going to want to make sure 120 frames are available in the layer of the Timeline in which you placed the sound. An Event sound doesn't have this restriction (although it also doesn't have the same synchronization behavior). Also, looping may be caused simply because your movie loops when you test it. While you're testing a movie, you can disable looping by selecting Control, Loop.

Q2:

I put a sound in the first frame of my movie, but when I click Play, I don't hear anything. I verified that my speakers are plugged in and that my computer sound level is cranked. What else could it be?

A2:

I wish I could say that you must use Test Movie because otherwise the sound won't work. Of course, Test Movie is always the best option for visualizing exactly what your users will see and hear. However, even Play should let you preview the sound. You might check two things: First, Mute Sounds under the Control menu should be unchecked, and the envelope settings for the sound instance should not be two horizontal lines at the lowest sound level. Second, you might check the original sound that you imported to make sure it's not just silence.

Q3:

I imported and placed in a keyframe a song I ripped from my band's CD; now every time I test the movie my computer hangs for a long time. Is there any way to speed this up?

A3:

Selecting short punk rock songs is one way. Seriously, just go into the Publish settings, select Raw for both Stream and Event, and remember to select Override Sound Settings. Now it won't perform the compression (the thing that takes forever) every time you publish. Just remember to change it back later before you're ready to publish for real.

Q4:

I imported an MP3 file that was only 61KB, but when I export the movie, it becomes 900KB. I'm sure my graphics aren't that big because when I remove the sound, the file goes down to 5KB. What could possibly be wrong?

A4:

Most likely you're resampling the sound (as Raw) and Flash is converting the sound into the size it would be as an uncompressed sound. Check the Publish Settings dialog box in Flash and confirm that you don't have Override Sound Settings selected. Then inspect the Sound Properties dialog box for the Library item of your imported sound and confirm that the MP3 settings match the original attributes of your file (shown near where the date and file location are displayed).

Q5:

Where is that starter ActionScript code for playing an external MP3 file that you promised?

A5:

Put an MP3 file (named in this case music.mp3) adjacent to your .swf (and remember to upload it when you post it on the Web); then put this code in the frame where you want the sound to start playing:

 my_sound = new Sound(); my_sound.loadSound("music.mp3", true); 

That's it. The true option says "start playing this sound as soon as you can don't wait for it all to download first."

     < Day Day Up > 


    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    ISBN: 0672327546
    EAN: 2147483647
    Year: 2006
    Pages: 235

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net