flex4 - outline flex 4 fxg graphic -
i'm trying add thick border edge of fxg shape (shapes:munch2 id="paper") in flex 4 represent bleed area.
please can suggest way this, need variable width, rather setting when draw fxg
thanks david
<?xml version="1.0" encoding="utf-8"?> <s:module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:shapes="fxggraphics.shapes.*" width="100%" height="100%"> <fx:declarations> <!-- place non-visual elements (e.g., services, value objects) here --> </fx:declarations> <fx:style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; @namespace shapes "fxggraphics.shapes.*"; #paper { border: 3px solid #ff6600; } </fx:style> <shapes:munch2 id="paper" width="100%" height="100%" horizontalcenter="0" verticalcenter="0" /> </s:module>
fxg assets optimized displaying graphics , don't support css styles or lot of other things flex component does.
also, flex doesn't support shorthand syntax you're using set border. css in flex rather limited when compared can css in html.
one simple solution wrap fxg asset in flex component bordercontainer
. can apply border container object:
<s:bordercontainer bordercolor="#ff0000" borderweight="2" cornerradius="6"> <local:myfxgasset /> </s:bordercontainer>
the style attributes bordercolor
, borderweight
, etc. can applied via css (but not using shorthand/combined syntax).
Comments
Post a Comment