This content has been marked as final. Show 5 replies
You probably want to reference the files using a relative path naming
scheme. On the server, the drive certainly won't be C:.
/a some mp3 files
You have main movie in root and then a music folder with folders a and b
within it. From flash the path to some mp3 files in the a folder would be:
Adobe Community Expert
Thanks for your response.
The requirement for using an absolute path is to access files that are outside of the web root. If the MP3s were stored below the root then a relative path (as per your description below) would be fine. However, to keep the MP3s in a directory that isn't directly accesible from a browser I was hoping to use an absolute path.
On the server I have a directory on the data drive (you're right, it's not the C: drive!) where the MP3's are stored. I can access these files from my VB application by using the file system object, making them accessible to an authorised user but not directly accessible by inputting a URL into a browser. This is what I was hoping to achieve in Flash - the actionscript will load the mp3 file into my movie using an absolute path to locate it on the server, but the mp3 file itself can't be accessed directly through a browser as it is above the web root.
Is there an established format for calling files using an absolute path in Flash when using the loadMovie or loadSound actions?
as far as i know flash does not allow this... is this your own server? like apache? or is this a server somewhere else? if it is your own you will have to configure the server itself to not allow access to the folders from outside... if it is someone elses you'll have to talk to them... i think for security reasons flash is not able to access the harddrive like that.
now, i did read somewhere that i think as of flash 8 they have an object that can open up a file browser window... but you have to use another language i think like php or js to actually make use of it... i could be wrong because i can no longer find where i read it, but i'm almost positive i did
ok i did find the fileReference object... it will open up the dialog box for browsing files, but i think it is used only for choosingfiles to upload or download.
Thanks for your comments.
I think that you're right. It seems that Flash won't allow you to access files on the server that are outside of the web root for (understandable) security reasons. The solution that I've come up with is to use the file system object to access the MP3 with VB, then stream that track to the Flash movie and load it as a sound object.
I think that's probably the best solution until actionscript is modified to allow access to directories on the server outside of the web root.