Hi list
In the Flash IDE, if you want the stroke of an object to NOT scale when you scale the object, or zoom in and out, I understand you need to set the Scale mode to ‘none’ in the stroke properties menu when you have an object selected.
So now I’m writing a command in jsfl to change the stroke-width and colour of a batch of library items based on currently selected objects - because I have 400+ items in my library and I want to automate the process.
In the code below, the stage instances have the same name as the library objects and I am asking it to set stroke-width and change scale mode to none. It changes the stroke-width ok, but it is ignoring the line doc.setStrokeScaleType(‘none’) - any ideas why this isn’t working?
var doc = fl.getDocumentDOM();
var strokeSize=parseFloat(prompt(“Enter Stroke-width [pixels]”));
//build an array of names of selected objects
var myArray = new Array();
for(var i=0; i<doc.selection.length; i++){
myArray*=doc.selection*.name;
}
//run through array and edit underling library item
for (var k=0;k<myArray.length;k++) {
doc.library.editItem(myArray[k]);
doc.setStrokeSize(strokeSize);
doc.setStrokeColor(’#333333’);
doc.setStrokeScaleType(‘none’);
doc.exitEditMode();
}