# .setStrokeS

**URL:** <https://forum.kirupa.com/t/setstrokes/316675>\
**Category:** flash\
**Created:** [November 29, 2010, 6:07pm UTC](https://forum.kirupa.com/t/setstrokes/316675 "2010-11-29T18:07:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graphboy](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@graphboy](https://forum.kirupa.com/u/graphboy)\
**Post date:** [November 29, 2010, 6:07pm UTC](https://forum.kirupa.com/t/setstrokes/316675/1 "2010-11-29T18:07:56Z")

</div>

Hi list - 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 (code below - the stage instances have the same name as the library objects). It works perfectly, EXCEPT it is ignoring the line doc.setStrokeScaleType(‘none’).

I don’t want the stroke of the library objects to scale - this seems to be the only way to do this on library items - 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();  
}
