<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:esri="http://www.esri.com/2008/ags" xmlns:s="library://ns.adobe.com/flex/spark" pageTitle="Play with Polyline symbols"> <fx:Script> <![CDATA[ private function toHex(item:Number):String { var hex:String = item.toString(16); return ("00000" + hex.toUpperCase()).substr(-6); } ]]> </fx:Script> <fx:Declarations> <esri:SimpleLineSymbol id="mySymbol" width="{lineWidth.value}" alpha="{lineAlpha.value}" color="{lineColor.selectedColor}" style="{lineStyle.selectedItem}"/> </fx:Declarations> <esri:Map> <esri:OpenStreetMapLayer /> <esri:GraphicsLayer> <esri:Graphic symbol="{mySymbol}" toolTip="Change this polyline using the top Wizard on the right"> <esri:geometry> <esri:Polyline spatialReference="{new SpatialReference(102100)}"> <fx:Array> <fx:Array> <esri:MapPoint id="Tokyo" x="15558700" y="4259400"/> <esri:MapPoint id="Beijing" x="12959100" y="4851401"/> <esri:MapPoint id="UlanBator" x="11901900" y="6093100"/> <esri:MapPoint id="Malmo" x="1447100" y="7477200"/> <esri:MapPoint id="SanFrancisco" x="-13627100" y="4548900"/> <esri:MapPoint id="SantaBarbara" x="-13330400" y="4086500"/> </fx:Array> </fx:Array> </esri:Polyline> </esri:geometry> </esri:Graphic> </esri:GraphicsLayer> </esri:Map> <mx:Panel right="5" top="5" horizontalAlign="right" paddingBottom="0" paddingTop="0" title="Simple Line Properties"> <mx:Form alpha="0.8" backgroundColor="0xEEEEEE" paddingBottom="5" paddingTop="5"> <mx:FormItem label="Color"> <mx:ColorPicker id="lineColor" selectedColor="0x009966"/> </mx:FormItem> <mx:FormItem label="Width:"> <s:HSlider id="lineWidth" width="100" liveDragging="true" maximum="20" minimum="0" snapInterval="1" value="8"/> </mx:FormItem> <mx:FormItem label="Alpha:"> <s:HSlider id="lineAlpha" width="100" liveDragging="true" maximum="1" minimum="0" snapInterval="0.01" value="1"/> </mx:FormItem> <mx:FormItem label="Style:"> <s:DropDownList id="lineStyle" top="35" cornerRadius="0" fontWeight="normal" horizontalCenter="0" selectedIndex="4"> <s:ArrayList> <fx:String>dash</fx:String> <fx:String>dashdot</fx:String> <fx:String>dashdotdot</fx:String> <fx:String>dot</fx:String> <fx:String>solid</fx:String> </s:ArrayList> </s:DropDownList> </mx:FormItem> </mx:Form> </mx:Panel> <s:Panel width="90%" height="60" bottom="70" backgroundColor="#D3D1D1" borderAlpha="0.8" horizontalCenter="0" maxWidth="600" title="mxml for Simple Line symbol"> <s:layout> <s:HorizontalLayout horizontalAlign="center" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0"/> </s:layout> <mx:TextArea width="100%" height="100%" condenseWhite="true" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0"> <mx:htmlText> &lt;esri:SimpleLineSymbol color="0x{toHex(lineColor.selectedColor)}" width="{lineWidth.value}" alpha="{lineAlpha.value}" style="{lineStyle.selectedItem}" /&gt; </mx:htmlText> </mx:TextArea> </s:Panel> </s:Application>Solved! Go to Solution.
ArcGIS API 3.0 (final) for Flex
...
Requires Adobe Flex 4.6 SDK or higher, which in turn requires at least Flash Player 11.1.
...
Karol,
So you have the AGS Flex API 3.0 swc in your projects libs folder and doe not have any other older version of the AGS Flex API swc in there right?
ArcGIS API 3.0 (final) for Flex
...
Requires Adobe Flex 4.6 SDK or higher, which in turn requires at least Flash Player 11.1.
...