This content has been marked as final.
Show 3 replies
-
1. Re: Accessing JSFL from a SWF
NSurveyor Jun 22, 2006 5:23 PM (in response to caskater)I don't get what you are trying to do. JSFL is for the authoring environment, e.g. making it easier to do something within Flash. If you make your SWF a Flash panel (a panel in the authoring environment), you can call jsfl files with something like:
MMExecute("fl.runScript(\"makeEverythingBlue.jsfl\");");
But note, ALL OF THIS is happening within Flash. -
2. Re: Accessing JSFL from a SWF
caskater Jun 22, 2006 5:48 PM (in response to caskater)Yea thats what I am working on .... a flash panel. Its having a problem running though. It doesn't seem to like a relative path name, it wants a full path name such as file://C|/...../myfile.jsfl which isnt very helpful since the location will vary depending on installation and platform. Also, does this return values... part of me needing to execute through the JSFL is to get stuff back, how can I get return information into the SWF? -
3. Re: Accessing JSFL from a SWF
NSurveyor Jun 22, 2006 8:09 PM (in response to caskater)OK, just making sure...
Ok so, I think you could use _url property to make an absolute path based on the current swf... Also, instead of just calling the JSFL file, call a specific function within the JSFL file that returns a value, and you can pass arguments if you like. Note, this value will be a string:
var path = _url.split("/").slice(0,-1).join("/")+"/makeEverythingBlue.jsfl"
var jsfl = 'fl.runScript("'+path+'","functionInTheFile","arg1",2,"arg3!!");'
MMExecute("success = "+jsfl);
trace(success);
I haven't tested the above, but it looks awright to me.