JSFL for Circles, Grids, and Auto-Naming

By robin, April 28, 2010 3:18 am

I’m doing a lot of layout for some games using the swf>xna converter. One thing that is tedious in flash is renaming all your instances sq_0, sq_1, sq_2… Also grid layout is more tedious than it should be, and circular layout almost not doable (Flash really needs a ‘repeat’ like ctrl’R in CorelDraw!). Jsfl to the partial rescue.

These are the scripts I’ve been using a fair bit, they are somewhat handy to me, so posting them here just in case they are for you too. Like all script it is basically vomit on the page, tweaked until it barely works, so buyer beware. Basically you select objects on the stage, and run the commands.

// makes groups of grids in place (and reindexes) based on the w/h and instance root names.
// Selection of multiple groups allowed.
// eg. 20 objects with the root “square” and 15 with the root “circle”
// will make two grids, one of circles and one of squares.
// To change the center point between fixed, averaged, or weighted, look at the last lines

http://blog.debreuil.com/images/CirclesAndGrids.zip

makes circles with jsfl

Comments are closed

Panorama theme by Themocracy