Click to See Complete Forum and Search --> : Opening a file through Javascript or any other code!? possible?
Mystical_Ice
08-11-2004, 04:35 PM
I'm actually making a desktop for myself and some friends in Flash, and the "icons" on the desktop are going to be animated buttons... when i click a button, i want a folder or file to open... but apparently with the Flash plugin calling to an external file is disabled, for security reasons... which makes sense.
I want to know if there's any way around this. For instance, could i call a Javascript script in a HTML file through Flash which would in turn open a file?
Is there any way to do this
Thanks
BillyRay
08-12-2004, 04:06 AM
You can access files in JS using the FileSystemObject ActiveX control, but that will limit you to IE only.
Then again - what do you mean by "open" a file? Read from it, execute it, view it, or something entirely different?
Hope this helps,
Dan
Mystical_Ice
08-12-2004, 11:47 AM
well i'd like it to actually OPEN a file.
like for instance, if i set one of the icons to call a javascript script that opens c:/documents and settings/me/desktop/file01.txt
so when i click the icon, file01.txt will pop open. also then it's fairly easy to just edit the javascript file (that Flash calls to) if i want to change the location of a file it opens.
you understand what i'm saying? i'm stumped, but i'd really like to get this to work :)
Thanks a lot
~Lorenzo
Exuro
08-12-2004, 12:13 PM
Sorry, but I don't think that it's possible to do what you're wanting through the browser without the little "Open/Save As" dialog box popping up.