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.



      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:LinearGradient rotation="90">


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






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





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




      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



      I recall of each element from actionscript?