2 Replies Latest reply on Aug 3, 2009 12:48 AM by ShardulSingh

    Usage of operator "-" in flex.


      Hi i am new to flex and would like to know the correct syntax for using the operator "-". As when i m using the below code i am getting the result as a string and not as a number.






      <?xml version="1.0" encoding="utf-8"?>



      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"







      varfirstNo = 20



      var secondNo = 10



      var operatorSym = "-"







      reslutTxt.text = firstNo+operatorSym+secondNo







      x="305" y="205" id="reslutTxt" creationComplete="showResult()"



      Result of this is showing as  20+10, but it should be 30. Pls help on this.