[Flashcoders] jsfl aligning movieclip symbols to top left

2008-02-15 Thread Some Dude
Does anybody know what the jsfl would look like to automate the process of
aligning movieclips to the top left as opposed to centered? I have a cs3 fla
with lots of symbols that need to be aligned top left. Thanks if anybody can
help.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] jsfl aligning movieclip symbols to top left

2008-02-15 Thread Dennis - I Sioux

Hey,

I had it in a panel i made.. so just copied the specific lines..

fl.getDocumentDOM().selectAll();
fl.getDocumentDOM().align(alignType, alignStageType);

With kind regards,

Dennis
Isioux

- Original Message - 
From: Some Dude [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Friday, February 15, 2008 3:13 PM
Subject: [Flashcoders] jsfl aligning movieclip symbols to top left



Does anybody know what the jsfl would look like to automate the process of
aligning movieclips to the top left as opposed to centered? I have a cs3 
fla
with lots of symbols that need to be aligned top left. Thanks if anybody 
can

help.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

__ NOD32 2878 (20080215) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] jsfl aligning movieclip symbols to top left

2008-02-15 Thread Adrian Park
I've just been writing a tonne of JSFL scripts for a project so have done a
lot of this. Here's a few generic lines grabbed form some of my scripts...
code

var focussedDoc = fl.getDocumentDOM();
var targetLibrary = focussedDoc.library;
var selectedItems = targetLibrary.getSelectedItems();
for( i = 0; i  selectedItems.length; i++ ) {
targetLibrary.editItem( selectedItems[i].name );
 var editingTimeline = fl.getDocumentDOM().getTimeline();
for( e = 0; e  editingTimeline.layers[0].frames[0].elements.length; e++ ) {
var currentElement = editingTimeline.layers[0].frames[0].elements[e];
currentElement.x = 0 + currentElement.width/2;
currentElement.y =  0 + currentElement.height/2;
}
}
focussedDoc.exitEditMode();

/code

To use this:
1) Select all the symbols in the library you would like to align
2) run the command

Note:
- It assumes that each library symbol consists of only a single frame and a
single layer. If there are more layers and frames you'll need to iterate
through each of them using the editingTimeline.layers and
editingTimeline.layers[x].frames arrays.
- It will align all elements on a single frame so the top left corners of
their bounding boxes are at 0,0
- all raw shapes on a single frame are treated as a single element. They
need to be grouped or converted to symbols to be treated individually by
JSFL
- it will return your editing focus to the main timeline upon completion

Without knowing more about the exact structure of your symbols it's a little
difficult to be more precise with the code but this should give you the
basics you need to customise your own script.

HTH
Adrian Park


On Fri, Feb 15, 2008 at 3:13 PM, Some Dude [EMAIL PROTECTED]
wrote:

 Does anybody know what the jsfl would look like to automate the process of
 aligning movieclips to the top left as opposed to centered? I have a cs3
 fla
 with lots of symbols that need to be aligned top left. Thanks if anybody
 can
 help.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] jsfl aligning movieclip symbols to top left

2008-02-15 Thread Steven Sacks

Open the Flash History panel.

Align a movieclip to top left.

Look at the History panel for the JSFL it used to do that.

Now you know what it looks like.


Some Dude wrote:

Does anybody know what the jsfl would look like to automate the process of
aligning movieclips to the top left as opposed to centered? I have a cs3 fla
with lots of symbols that need to be aligned top left. Thanks if anybody can
help.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders