Monday, March 22, 2010

handy dandy little script for counting...

I have this little jsfl script which came from one of the
contributors to

this NG, works a treat for telling me exactly how many frames
I have

selected at a time, heavensent for ''paste frames'', a wonder
why Adobe never

incorporated such a thing into the interface.



Anyway it worked fine in Flash 8 - I just dropped it into
''\en\First

Run\Commands'' folder and up it pops in my Command Menu. It
doesn't happen in

CS3 though. It still works if I launch it manually while
running Flash, but

they must have done something to the DOM that prevents it
from showing in

the menu.



Can anybody help me out with that? Here is the script:



var current_tl = fl.getDocumentDOM().getTimeline();

var selectedFrames = current_tl.getSelectedFrames();

var selectedRegions = selectedFrames.length/3;

fl.outputPanel.clear();

fl.trace('Selected Regions: '+selectedRegions);

var count = 0;

while(selectedFrames.length){

count++;

var region = selectedFrames.splice(0,3);

fl.trace(' -Region '+count+':');

fl.trace(' First Frame: '+(region[1]+1));

fl.trace(' Last Frame: '+(region[2]));

fl.trace(' Selection Span: '+(region[2]-region[1]));

}





handy dandy little script for counting...
Ok - I just figured it out. It all goes in Local Settings:
\Local

Settings\Application Data\Adobe\Flash
CS3\en\Configuration\Commands







''Stephen C'' %26lt;macromforums@REMOVETHISBLOCKdv8.info%26gt;
wrote in message

news:f20vpb$fv3$1@forums.macromedia.com...

%26gt;I have this little jsfl script which came from one of the
contributors to

%26gt;this NG, works a treat for telling me exactly how many
frames I have

%26gt;selected at a time, heavensent for ''paste frames'', a
wonder why Adobe never

%26gt;incorporated such a thing into the interface.

%26gt;

%26gt; Anyway it worked fine in Flash 8 - I just dropped it
into ''\en\First

%26gt; Run\Commands'' folder and up it pops in my Command Menu.
It doesn't happen

%26gt; in CS3 though. It still works if I launch it manually
while running Flash,

%26gt; but they must have done something to the DOM that
prevents it from showing

%26gt; in the menu.

%26gt;

%26gt; Can anybody help me out with that? Here is the script:

%26gt;

%26gt; var current_tl = fl.getDocumentDOM().getTimeline();

%26gt; var selectedFrames = current_tl.getSelectedFrames();

%26gt; var selectedRegions = selectedFrames.length/3;

%26gt; fl.outputPanel.clear();

%26gt; fl.trace('Selected Regions: '+selectedRegions);

%26gt; var count = 0;

%26gt; while(selectedFrames.length){

%26gt; count++;

%26gt; var region = selectedFrames.splice(0,3);

%26gt; fl.trace(' -Region '+count+':');

%26gt; fl.trace(' First Frame: '+(region[1]+1));

%26gt; fl.trace(' Last Frame: '+(region[2]));

%26gt; fl.trace(' Selection Span: '+(region[2]-region[1]));

%26gt; }

%26gt;

%26gt;





handy dandy little script for counting...
could you possibly make this file downloadable?
You can just copy the text into notepad or any text editor
and save it as

''FrameCount.jsfl''. Or in the ''New Document'' dialogue in Flash
choose ''New

Flash Javascript file'' paste it into there and save it. Here
it is again:







var current_tl = fl.getDocumentDOM().getTimeline();

var selectedFrames = current_tl.getSelectedFrames();

var selectedRegions = selectedFrames.length/3;

fl.outputPanel.clear();

fl.trace('Selected Regions: '+selectedRegions);

var count = 0;

while(selectedFrames.length){

count++;

var region = selectedFrames.splice(0,3);

fl.trace(' -Region '+count+':');

fl.trace(' First Frame: '+(region[1]+1));

fl.trace(' Last Frame: '+(region[2]));

fl.trace(' Selection Span: '+(region[2]-region[1]));

}









''dzedward'' %26lt;dzedward@gmail.com%26gt; wrote in message

news:f21skv$l20$1@forums.macromedia.com...

%26gt; could you possibly make this file downloadable?






I have the same problem (jsfl scripts not showing up in
Commands menu), and the Application Data route isn't working for
me. I had this folder: \Local

Settings\Application Data\Adobe\Flash CS3\en\Configuration\
but there was no ''Commands'' folder in it, so I made one and put my
command files in there. Still didn't show up. Not sure what to
do... The three XML commands that show up in the Commands menu are
located in the Program Files\Adobe\Adobe Flash CS3\en\First
Run\Commands folder, but my commands don't show up there either.



Any help would be appreciated (Adobe have anything official
on this?)..

Jeremy
mine doesnt show up in the command menu, if i select a bunch
of frames, then go to run command and find the file, click open,
then it works. so try that.

No comments:

Post a Comment