0 Replies Latest reply on Jul 8, 2011 12:06 PM by lingo55

    Help creating grid

    lingo55

      Hi again. I need to know if it is possible to create a visible grid inside a BorderContainer and make draggable objects in it snap to grid.

       

      This is the code for my BorderContainer:

       

       

      <s:BorderContainer x="10" y="10" width="853" height="581" backgroundColor="#F0EEEE">

      <s:BorderContainer
      width="630" height="394" x="33" y="155"  borderVisible="true" dropShadowVisible="true" borderColor="#E1E1E1">

      <s:layout>
            <s:BasicLayout/>

      </s:layout>

      <s:RichEditableText id="MyAddress"text="my address here" fontSize="12" mouseDown="MyAddress.startDrag();" mouseUp="MyAddress.stopDrag();"mouseOut="resetHandler(event)" mouseOver="clickHandler(event)"x="114" y="64" fontFamily="Verdana" textAlign="right"/>

      <s:RichEditableText id="MyWebsite"text="my website here" fontSize="12" mouseDown="MyAddress.startDrag();"mouseUp="MyAddress.stopDrag();"mouseOut="resetHandler(e vent)" mouseOver="clickHandler(event)"x="115" y="158" fontFamily="Verdana" textAlign="right"/>

      <s:RichEditableText id="MyPhone"text="my phone here" fontSize="12" mouseDown="MyAddress.startDrag();" mouseUp="MyAddress.stopDrag();"mouseOut="resetHandler(event)" mouseOver="clickHandler(event)"x="125" y="82" fontFamily="Verdana" textAlign="right"/>

      <s:RichEditableText id="MyFax"text="my fax here" fontSize="12" mouseDown="MyAddress.startDrag();" mouseUp="MyAddress.stopDrag();"mouseOut="resetHandler(event)" mouseOver="clickHandler(event)"x="146" y="99" fontFamily="Verdana" textAlign="right"/>

      <s:RichEditableText id="MyMobile"text="my mobile here" fontSize="12" mouseDown="MyAddress.startDrag();" mouseUp="MyAddress.stopDrag();"mouseOut="resetHandler(event)" mouseOver="clickHandler(event)"x="124" y="116" fontFamily="Verdana" textAlign="right"/>

      <s:RichEditableText id="MyEmail"text="my email here" fontSize="12" mouseDown="MyAddress.startDrag();" mouseUp="MyAddress.stopDrag();"mouseOut="resetHandler(event)" mouseOver="clickHandler(event)"x="132" y="133" fontFamily="Verdana" textAlign="right"/>

      <s:RichEditableText id="MyName"text="my name here" fontSize="24" mouseDown="MyName.startDrag();" mouseUp="MyName.stopDrag();"mouseOut="resetHandler(event)" mouseOver="clickHandler(event)"x="50" y="23" fontFamily="Verdana" textAlign="right"/>

      <mx:Image x="254" y="280"
             source="images/your_logo.png"
             mouseDown="img1.startDrag();"
             mouseUp="img1.stopDrag();"
             mouseOut="resetHandler(event)"
             mouseOver="clickHandler(event) id="img1"
             complete="smoothImage(event)"/>
      </s:BorderContainer>