3 Replies Latest reply on May 21, 2010 1:33 PM by PegLeg7

    Problems writing a mx:component

    PegLeg7

      I am building an site and trying to utilize the component control.  My problem is that when I try to add anything before the VBox such as Scirpt I get an error 'Parse error '<mx:Script>'.  If I put a NumberFormatter it gives me an error related to that.

       

      Can anyone either point to the answer or tell me what I am doing wrong?

       

      <mx:Component className="infoWindowRenderer" xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
        <![CDATA[

          code......................
             
         ]]>
        </mx:Script>
        <mx:VBox backgroundColor="0x9CF2EB">
          <mx:HBox width="100%" backgroundColor="0xEEEEEE" height="20">
          <mx:Label text="TIP ID:  {data.PROID}" fontWeight="bold"/>
          <mx:Spacer width="100%"/>
           <mx:Button id="closeButton"
              width="18"
              height="18"
              label="X"
              fontSize="12"
              paddingBottom="0"
              paddingLeft="0"
              paddingRight="0"
              paddingTop="0"
              fontWeight="bold"
              toolTip="Close"/>
        </mx:HBox>

      </mx:component>