Hi, I am having some problems transforming shapes w/ stroke using TransformManager for my application. Any help would be great!
I have an app where I am letting users drag shapes out onto the stage, and be able to manipulate their size, x, y, color, stroke, etc. The problem I am running in to is when TransformManager scales a shape graphic:
mySprite.graphics.lineStyle(1, 0x000000, 1);
mySprite.graphics.beginFill(0xCCCCCC, 1);
mySprite.graphics.drawRoundRect(0,0,50,50,0,0);
mySprite.graphics.endFill();
mySprite.graphics.moveTo(0,0);
mySprite.graphics.lineTo(0, 0);
When resizing the shape, not only does the shape transform size but the stroke also transforms size. It is obviously scaling the entire shape, which includes the stroke/border (lineStyle). I need to be able to scale the shape, but keep the stoke from scaling. I did find one solution...setting the lineStyle scaleMode to "none".
mySprite.graphics.lineStyle(1, 0x000000, 1, false, "none");
This works fine, but my app also allows the user to zoom up on the entire stage. I do this by changing the scaleX and scaleY of the parent container. When I zoom on the stage and the shape stoke has scaling set to "none", then my stoke does not scale. I DO NOT want the stoke to scale on resize using the TransformManger, but I DO want the stoke to scale when the user zooms the stage. I cannot for the life of me find a way to get around this without having to re-write a bunch of code. Please help!