views:

31

answers:

2

Hi, im having problems with my artwork in flash. I am vectoring playing card faces. My problem is, even if Im using the thinnest stroke which is 0.1, when i zoom out the page, the line becomes thick which looks bad in the flash game. Can anyone tell me how i can make the stroke be the same in appearance even if I zoom out the page?

A: 

you should make this stroke depends of application sizes, so you should have some size change events handler, and go throw list of showed cards, and change each stroke.

but the world is liking easy things, imho I'd prefer to use such code for Flex 4:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<s:Group id="yourCard" width="30%" height="40%">
    <s:Rect top="0" bottom="0" left="0" right="0">
        <s:stroke>
            <s:SolidColorStroke weight="{this.width/YOUR_KOEFFICIENT}"/>
        </s:stroke>
        <s:fill>
            <s:BitmapFill source="your_image_here.png"/>
        </s:fill>
    </s:Rect>
</s:Group>
</s:Application>
Eugene
This would be easier: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/graphics/SolidColorStroke.html?allClasses=1#scaleMode
Claus Wahlers
yes, if it will be enough for application and enough for flex3, then yes.
Eugene
+1  A: 

At least in Flash CS5 (and i think in CS4 too, but i'm not sure) you can set stroke scaling from "normal" to "none", which results in the effect you're after (strokes not being scaled when zooming in).

Claus Wahlers
and in case you're drawing with ActionScript, there's an argument in Graphics::lineStyle() you can use to set the scale mode:public function lineStyle(thickness:Number = NaN, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3):void
Claus Wahlers