Packageio.github.ycabon.markings.lineClasses
Classpublic class IconPart
InheritanceIconPart Inheritance flash.display.Sprite
Implements ILinePart, spark.core.IGraphicElementContainer

The IconPart can be used as a part of an AdvancedLineSymbol.

This part creates and places markers along the line using Spark primitives from the Flex SDK:

  ...
  <mk:AdvancedLineSymbol>
      <s:ArrayList>
          <mk:IconPart repeat="15">
              <s:Ellipse width="10" height="10">
                  <s:fill>
                      <s:SolidColor color="0xFD7F00"/>
                  </s:fill>
                  <s:stroke>
                      <s:SolidColorStroke color="0xFFD92F" weight="2"/>
                  </s:stroke>
              </s:Ellipse>
          </mk:IconPart>
      </s:ArrayList>
  </mk:AdvancedLineSymbol>
  ...
  

MXML SyntaxexpandedHide MXML Syntax

The <mk:IconPart> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:

  <mk:IconPart
    Properties
    graphicElement="null"
    offset="NaN"
    repeat="NaN"
    rotate="false"
  />
  

Default MXML PropertygraphicElement

See also

spark.primitives.BitmapImage
spark.primitives.Ellipse
spark.primitives.Line
spark.primitives.Path
spark.primitives.Rect


Public Properties
 PropertyDefined By
  graphicElement : GraphicElement
The element that will be repeated along the line.
IconPart
  offset : Number
Number that specifies the distance from the start of the Polyline.
IconPart
  percentOffset : Number
Number that specifies the distance from the start of the Polyline.
IconPart
  percentRepeat : Number
Number that specifies the distance between to repetitions of the graphicElement.
IconPart
  repeat : Number
Number that specifies the distance between to repetitions of the graphicElement.
IconPart
  rotate : Boolean
Whether or not the graphic element is rotated to make in look like it follows it.
IconPart
Public Methods
 MethodDefined By
  
IconPart(graphicElement:GraphicElement = null, offset:Number, percentOffset:Number, repeat:Number, percentRepeat:Number, rotate:Boolean = false)
Constructor.
IconPart
Events
 Event Summary Defined By
  Dispatched when the value of the part changes as a result of its properties modifications.IconPart
Property Detail
graphicElementproperty
graphicElement:GraphicElement

The element that will be repeated along the line. The element must not have filters, blend mode, transformations defined to be properly render.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get graphicElement():GraphicElement
    public function set graphicElement(value:GraphicElement):void

See also

offsetproperty 
offset:Number

Number that specifies the distance from the start of the Polyline. One typical use of this property is for giving the impression of movement.

Note: You can specify a percentage value in the MXML offset attribute, such as offset="100%", but you cannot use a percentage value in the offset property in ActionScript. Use the percentOffset property instead.

Setting the percentOffset property resets this property to NaN.

The default value is NaN.

This property can be used as the source for data binding.


Implementation
    public function get offset():Number
    public function set offset(value:Number):void

See also

percentOffsetproperty 
percentOffset:Number

Number that specifies the distance from the start of the Polyline. One typical use of this property is for giving the impression of movement.

Setting the offset property resets this property to NaN.

The default value is NaN.

This property can be used as the source for data binding.


Implementation
    public function get percentOffset():Number
    public function set percentOffset(value:Number):void

See also

percentRepeatproperty 
percentRepeat:Number

Number that specifies the distance between to repetitions of the graphicElement. If the value is NaN, the element is not repeated.

Setting the repeat property resets this property to NaN.

The default value is NaN.

This property can be used as the source for data binding.


Implementation
    public function get percentRepeat():Number
    public function set percentRepeat(value:Number):void

See also

repeatproperty 
repeat:Number

Number that specifies the distance between to repetitions of the graphicElement. If the value is NaN, the element is not repeated.

Note: You can specify a percentage value in the MXML repeat attribute, such as repeat="100%", but you cannot use a percentage value in the repeat property in ActionScript. Use the percentRepeat property instead.

Setting the percentRepeat property resets this property to NaN.

The default value is NaN.

This property can be used as the source for data binding.


Implementation
    public function get repeat():Number
    public function set repeat(value:Number):void

See also

rotateproperty 
rotate:Boolean

Whether or not the graphic element is rotated to make in look like it follows it. Setting this flag to true has some impact on performances if a lot of objects are render.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get rotate():Boolean
    public function set rotate(value:Boolean):void
Constructor Detail
IconPart()Constructor
public function IconPart(graphicElement:GraphicElement = null, offset:Number, percentOffset:Number, repeat:Number, percentRepeat:Number, rotate:Boolean = false)

Constructor.

Parameters
graphicElement:GraphicElement (default = null)
 
offset:Number (default = NaN)
 
percentOffset:Number (default = NaN)
 
repeat:Number (default = NaN)
 
percentRepeat:Number (default = NaN)
 
rotate:Boolean (default = false)
Event Detail
change Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.CHANGE

Dispatched when the value of the part changes as a result of its properties modifications.