2 Replies Latest reply on Aug 13, 2009 1:10 PM by Mainmanian

    Parse error

    Mainmanian Level 1

      In my application, I have a registration form for users and before the users can register, they need to accept Terms and Conditions. In my attempt to code that piece, I am encountering a Parse Error. I am unable to get beyond this. Can someone please help explain why I am getting this error and what to do to fix it? The code is attached below. The Parse Error is at the sole line in the init() routine. Thanks



      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
           paddingRight="0" paddingBottom="0"
           width="488" height="245"


              private function init():void {
                   this.tAndCText.htmlText = "I have read and agree to the <a href='event:terms'>Terms and Conditions</a> of the site";
              private function registerUser(event:Event):void {
                  if (termsAndConditionsCheckBox.selected) {
                      this.errorMessage.text = "OK";
                  } else {
                      this.errorMessage.text = "Not OK";
              private function checkBoxLink(event:TextEvent):void{
                  trace("Event triggered");
          <mx:FormHeading label="Sign up for myApp" horizontalCenter="left" textAlign="left"  fontFamily="Calibri" fontSize="14" width="166"/>
          <mx:FormItem label="Email" horizontalAlign="right" fontWeight="bold" fontFamily="Calibri" fontSize="12">
              <mx:TextInput id="user_id" toolTip="Your email address"/>
          <mx:FormItem label="Full Name" fontWeight="bold" fontFamily="Calibri" fontSize="12">
              <mx:TextInput id="user_name"/>
          <mx:FormItem label="I am" width="370" fontWeight="bold" fontFamily="Calibri" fontSize="12">
              <mx:ComboBox width="101" id="sex">
              <mx:GridRow width="100%" height="100%">
                  <mx:GridItem width="370" height="100%" paddingLeft="0" horizontalAlign="right">
                      <mx:CheckBox label="" id="termsAndConditionsCheckBox"/>
                      <mx:Text id="tAndCText" link="checkBoxLink(event)" height="22"/>
                      <mx:Spacer width="100%"/>
                      <mx:Button label="Sign Up"
                          fillAlphas="[1.0, 1.0]" fillColors="[#EFE215, #D91A1A]"
                          fontFamily="Calibri" fontSize="12"/>
          <mx:Label text="Error message" color="#DD2E0B" fontFamily="Arial"  id="errorMessage" fontWeight="bold" fontSize="12"  width="381"/>