JSFL Supporting Mulitple Source Files
Hi there, while creating an animate tool I've been able to access functions from other JSFL files. I've achieve this by adding this line at the top of each script:
var utilities_script = fl.configURI + 'WindowSWF/' + "utilities.jsfl";
And then when I need to actually call a function in (for example) utilities, I call this:
fl.runScript(utilities_script, "DistributeKeyFrames", distributionNumber);However, following the first call to the utilities script I can then access any function from utilities directly without the need to the fl.runScript call. So for example, if I needed to call DistributeKeyFrames again, I'd call:
DistributeKeyFrames(3)as if it was a local function. But this only works after calling the long fl.runScript the first time.
Would really appreate if someone could explain why this is so and also, is there a way to set things up during an initialisation where I could just call the function directly from the outset!
Thanks
Ant
