# setStrokeScaleType problem

**URL:** <https://forum.kirupa.com/t/setstrokescaletype-problem/316681>\
**Category:** flash\
**Created:** [November 29, 2010, 9:14pm UTC](https://forum.kirupa.com/t/setstrokescaletype-problem/316681 "2010-11-29T21:14:20Z")\
**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, 9:14pm UTC](https://forum.kirupa.com/t/setstrokescaletype-problem/316681/1 "2010-11-29T21:14:20Z")

</div>

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();  
}
