title: How to use else if { var in AS3 without returning 1083 error?
body: <p>I have an if/else if/else if/else if/else statment in AS3.</p>
  
  <p>It's a calendar that reads in dates from an xml file. The if/else if/else statements controls the look of a date according to whether it has an event, and whether it's past/present or future. The MouseEvent is a tooltip which shows the Event information.</p>
  
  <p>The last section is </p>
  
  <pre><code>else {
   var thisday:String = "&lt;b&gt;&lt;font color=\"#666666\" size=\"9\"&gt; &lt;u&gt;&lt;font size=\"12\"&gt; -&lt;/font&gt; " + yy + " &lt;font size=\"12\"&gt;-&lt;/font&gt; " + GlllStringUtil.checkDigits((mm + 1).toString()) + " &lt;font size=\"12\"&gt;-&lt;/font&gt; " + i.toString() + " &lt;font size=\"12\"&gt;- &lt;/font&gt;&lt;/u&gt;&lt;/font&gt;&lt;/b&gt; ";
   myCLabel = new ICLabel(); 
   myCLabel.date.htmlText = GlllStringUtil.checkDigits(i.toString());
   myCLabel.date.background = false;
   myCLabel.date.textColor = "0x666666";
   myCLabel.date.autoSize = TextFieldAutoSize.CENTER;
   myCLabel.date.selectable = false;
   myCLabel.date.mouseEnabled = true;
   myCLabel.y = 0;
   myCLabel.x = 25 * (i - 1);
   myCLabel.name = i.toString();
   myCLabel.data = thisday;
   myCLabel.addEventListener(MouseEvent.MOUSE_OVER, myCLabel_mouse_over);
   myCLabel.addEventListener(MouseEvent.MOUSE_OUT, myCLabel_mouse_out);
   calendarHolder.addChild(myCLabel);
  }
  </code></pre>
  
  <p>If I repeat this inside the statement I get a 1084 for using else if { var... </p>
  
  <p>I can use else, but then if I start the next section with if/else and while it does what I need - the appearance is overriden by this last if/else.</p>
  
  <p>I am trying to do this because there is only one statment for the appearance of future dates, which means that if there is a future event - it's not highlighted.</p>
  
  <p>How can I repeat it inside using else if { var, without it returning 1084?</p>
  
  <p>(Any assistance would be greatly appreciated as I have very little knowledge of AS3.)</p>
  
  <p>--</p>
  
  <p>Update:</p>
  
  <p>Thank you so much for your reply.</p>
  
  <p>The file is a .as and it's quite long so what I've done is upload it <a href="http://www.mediafire.com/?sharekey=dcf43948b83d459a61d4646c62b381cbe04e75f6e8ebb871" rel="nofollow noreferrer"><strong>here</strong></a>
  as a .txt file. There are also 2 small gif images to  try and demonstrate what I'm trying to acheive. (You'll notice (in the image) the tool tip appears over a highlighted date, but otherwise Future Dates aren't highlighted therefore you can't actually tell if there is an event unless you mouse over a date.)</p>
  
  <p>I hope that is okay.</p>
  
  <p>I did check to make sure that I didn't miss the closing brace before I posted but I think the error is beyond my understanding.</p>