Tuesday, April 28, 2009

Flash Actionscript 3 Internal and External Sounds

For Flash AS3, you may used embedded MP3 sound files or external among other formats.

External Sound Method:

var sndVarName:Sound = new Sound();
sndVarName.load(new URLRequest("path_to_file.mp3")
);
sndVarName.play();

Pro: Quicker SWF load time
Con: Delay in initially playing

This method has a delay when before the sound plays, but reduces load-time of the flash swf since the file is the embedded.


Internal Sound Method

1. Right click on the library Item
2. Select properties
3. Check "export for actionscript"
4. Give a class name, usually something like Myclassname, uppercase with the first letter. I usually use names that aren't likely to be reserved.

var sndVarName:Clicker = new Clicker();
sndVarName.play();

Wednesday, December 17, 2008

javascript state country resource

A good script for state and country dropdowns.

http://javascript.internet.com/forms/country-state-drop-down.html