December 5th, 2013, 11:42 AM
Join Date: Mar 2009
Time spent in forums: 33 m 38 sec
Reputation Power: 0
How Do I Use an External MP3 file Without Embedding it? (AS2)
I am using Adobe Flash CS6 with ActionScript 2.0.
I have compiled my project, and due the collection of embedded mp3 files (background music) I am using on various locations, my published swf file is over 12MB.
To reduce the size, I placed all the mp3 fiels in the same folder as the swf file and removed all reference to them from the project.
I then added this code to frame #1
var CreditsMusic:URLRequest = new URLRequest("NineWalkers.mp3");
var s:Sound = new Sound(CreditsMusic);
I am getting an error that says "The class or interface 'flash.net.URLRequest' could not be loaded."
Obviously, this is not working (I would not be posting here if it was).
What am I doing wrong?