Relative path for a music file in Flash CS5 Actionscript

AXISHK
AXISHK used Ask the Experts™
on
Any idea how to refer a music file in Actionscript if the referenced music file is one lever lower than flash file ? I'm using Adobe Flash CS5.

In myFlash.fla
------------------
song=new URLRequest("music01")


eg. \myFlash.fla
       \music\music01

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi,
The song path will be like this:

var songPath:String = new URLRequest("music/music01.mp3");

Hope this helps.

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
Paths to external files which are a level lower should be referenced like this:

"path/file.mp3"

Are you using AS2 or AS3?
Right ayanaculis,
I just made a typr of using the urlrequest:

var songPath:String = "music/music01.mp3";

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com
Then that should do it. Is this a standalone project or are you going to embed your file on a html file? If so, remember to set your path relative to the html file

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial