0 Replies Latest reply on Sep 20, 2010 8:41 AM by Szymon_Kizik

    How to use a object(in MXML - in FLEX 4) in multiple way.

    Szymon_Kizik

       

      This is my object in MXML:

       

       

      <mx1:Canvas id="menuElement" visible="true" rotationY="-15">

       

           <mx1:Canvas mask="{imageMask}">

                <mx1:Image id="menuImage" visible="true"/>

                <s:BorderContainer id="menuBackground" width="70" visible="true"  borderVisible="false">

                      <s:Label id="menuDescription" fontSize="30" fontWeight="bold" rotation="-90" />

                          <s:backgroundFill>

                               <s:LinearGradient rotation="90">

                                    <s:entries>

                                         <s:GradientEntry  id="backgroundColor" color="0x000010" alpha="0.6"/>

                                    </s:entries>

                               </s:LinearGradient>

                          </s:backgroundFill>

                     </s:BorderContainer>

                </mx1:Canvas>

           <mx1:Canvas id="imageMask" backgroundColor="#FF0000"/>

       

      </mx1:Canvas>

       

       

      I use this object (one time) with configuration in actionscript (positions, source of picture etc.) and I receive something like on a picture below:

       

       

      1.png.png

      Now, I need to create 4 elements like below. I don't wan't to copy 4 times this block of program. Anybody have idea how can I make it and how can

       

      2.png

      I recall of each element from actionscript?

      Regards