How to Troubleshoot Sound Objects |
Most problems experienced with sound objects involve a sound object that won't start or, when you try to stop one, more sounds stop than was intended. If a sound will not start, here are a few things to check:
Sound Will Not Start
- Make sure that the proper path to the sound object is included in the
start command. The proper path is wherever the sound object was defined.
For example, if the sound object is defined in a button located in a movie
clip named "mc02" which is in another movie clip called "mc01", the
ActionScript would appear as follows:
on (press) { _root.mc01.mc02.mySoundObject.start(); }
As stated earlier, if the sound objects are all defined in one frame on the _root, the path would always be the same, and this would not be something you didn't need to track.
- If you're trying to start a dynamically loaded MP3 that is configured as streaming with the mySoundObject.start() method, and it will not start, the Flash player probably needs to be updated to the latest version.
- For non-dynamically loaded sound objects, make sure that the linkage
identifier is properly typed - both where the sound object was defined and in
the linkage properties in the Flash library. Also make sure that the
identifier is a unique name. Remember that names are case sensitive and cannot
start with a number. Check for typos.
Stopping one Sound Stops Multiple Sounds
This is nearly always due to how or where the sound object was defined. One easy way to resolve this is to specify the linkage identifier name as part of the stop command:
mySoundObject.stop("mySoundObject01");
In the above example, "mySoundObject01" is the linkage identifier name that is set in the Flash library by right-clicking (or control-clicking for Macs) on the sound file and selecting "Export for ActionScript".
Sound Object Error Messages
- "One or more files were not imported because there were problems reading
them."
A common reason to get this error message is that the file being loaded was encoded at over 160kbps. Flash cannot import MP3's with a bit-rate over 160kbps.
Miscellaneous Sound Object Issues
There is currently a limitation of having no more than eight sounds playing simultaneously.
This document copyright © 2002 by Kenny Bellew, kennybellew@hotmail.com
» Level Intermediate |
Added: 2002-08-13 Rating: 8.98 Votes: 664 |
» Author |
Kenny Bellew is a technical writer in Minneapolis, MN. He's currently interested in becoming involved in other writing-related Flash projects. |
» Download |
Download the files used in this tutorial. |
Download (6170 kb) |
» Forums |
More help? Search our boards for quick answers! |