2 Replies Latest reply on Apr 10, 2013 7:43 PM by doodlemancer

    Flash CS6/JSFL: Relative fileURI's




      Back in Flash CS5 and earlier I could use relative paths in fileURI's passed to fl.OpenDocument(). E.g fl.openDocument( 'file:///myfile.fla' ); would locate myfile.fla in the same folder that the current script resides.


      However, when I do this in Flash CS6 I get an error saying "Cannot find file myfile.fla". Using absolute paths works, but that doens't solve the problem...


      Any clues, anyone?

        • 1. Re: Flash CS6/JSFL: Relative fileURI's



          It seems broken starting with CS5.5.


          (I'm on Windows).


          The problem seems resulting from current directory (folder) not being set when you open a script or FLA. So, relative paths still work but they are always relative to the root of C drive (in our tests) which of course defeats its purpose.



          Burak KALAYCI


          • 2. Re: Flash CS6/JSFL: Relative fileURI's

            You can use the URI class from XJSFL to convert your relative path to an absolute path but you have to download the XJSFL framework and initialise it in your JSFL file in order for it to work. You can download and find out more their website www.xjsfl.com


            p.s. apparently javascript errors won't show up in CS5 and earlier when you use XJSFL which is a major bummer