Hi,
I am a newbie for ActionScript. I would like to add Sound dynamically to my flv. I have this code. I am pretty sure it is working because I found it in Textbook. :(.
package{
import flash.display.Sprite;
import flash.media.Sound;
import flash.net.URLRequest;
public class soundLoader extends Sprite{
private var sound:Sound;
public function soundLoader(){
sound = new Sound(new URLRequest("sound.mp3"));
addChild(sound);
}
}
}
When I try to run the code I got these error messages.
1046: Type was not found or was not a compile-time constant: Sound.
1180: Call to a possibly undefined method Sound.
Where did I do wrong? Please,please help me.