1 Reply Latest reply on Oct 9, 2009 5:41 PM by Peter deHaan

    <fx:Library> from AS3

    tork314 Level 1



      I figured, that it is much easier to draw a shape in fxg (or just import it from let say catalyst), so I did it and put it in the library:


        <fx:Definition name="Separator">

        <s:Rect top="0" bottom="0" width="100%">


      <s:BevelFilter angle="120" shadowColor="#dddddd" highlightColor="#111111" distance="1" blurX="2" blurY="2"


      shadowAlpha="0.7" type="outer"/>



      <s:SolidColorStroke color="#111111"  weight="2" />






      now I would like to use this component from AS3.


      this.addElement(new Separator()) doesn't work...

        • 1. Re: <fx:Library> from AS3
          Peter deHaan Level 4



          One of my smarter co-workers offered this solution:

              <fx:Component className="MyGroup">
                      <s:Rect width="50" height="50">
                              <mx:SolidColor color="red" />



          Then you'll be able to add it to a group via: group1.addElement(new MyGroup());


          Hope that helps,



          1 person found this helpful