all groups > flash exchange extensions > november 2005 >
You're in the

flash exchange extensions

group:

Running a jsfl command from flash using MMExecute


Running a jsfl command from flash using MMExecute Michael Gioffredi
11/28/2005 12:14:29 AM
flash exchange extensions:
Running a jsfl command from flash using MMExecute is different from manually
selecting it from the Commands menu.

1) Selecting edit>undo after an effect that was executed from the command menu
undoes the entire command (good). However selecting edit>undo after a command
that was executed from a flash panel steps backwards through each and every
step the command took (bad). I have commands that take 1000+ steps so undoing
them becomes impossible after they are executed from flash.

2) Large scripts fail. Running the same script from flash, that works when it
is executed from the command panel, seems to skip steps. I?m not sure exactly,
but possibly steps that run other jsfl commands.

3) Scripts run much slower. Running a script from the command panel took about
5 seconds, while running the same script from flash took about 14 seconds.

Re: Running a jsfl command from flash using MMExecute dr_ross
12/4/2005 12:27:29 AM
I've noticeed the same points michael. Especially point 3, slower script
execution when run through MMExecute especially when i'm using a new StartPage,
mind you that is just slow altogether especially using MM components.
I havn't found a large script that fails yet. I've only done scripts needing
of under 1000 lines so you've probably exceded that and run into trouble, would
be interesting to debug the skipping of steps though.
Re: Running a jsfl command from flash using MMExecute Michael Gioffredi
12/4/2005 5:12:34 AM
The skipping of steps seems to be a problem with all jsfl scripts, not just
ones run from flash. I have two scripts; 1) Duplicate Layers and 2) Convert to
Graphic. If I manually run the first one, then the second, everything works
fine. However, if I run this script:

fl.runScript(fl.configURI + "/Commands/Duplicate Layers.jsfl");
fl.runScript(fl.configURI + "/Commands/Convert to Graphic.jsfl");

It fails. The Duplicate Layers works, but Convert to Graphic does not, which
makes no sense at all.

There seems to be a lot of bugs with jsfl.

Re: Running a jsfl command from flash using MMExecute dr_ross
12/5/2005 9:25:47 AM
I've tried to emulate the sort of command you'd have use in "duplicate layers"
and "convert to graphic" and havn't found any issues yet. If its still giving
you grief you could try having all the functionality of each script tied up in
a single function for each, then just call that function instead of just the
script as a whole. That may provide enough encapsulation. I wouldn't have
thought there'd be any command you'd use at the end of "duplicate layers" that
would cause a silent failure of "convert to graphic".
AddThis Social Bookmark Button