1 Reply Latest reply on Dec 4, 2013 1:35 PM by resdesign

    If statements and vars help please :o

    RavenDesign Level 1

      Ok so I used to do some flash so I know with JQuery its kind of the same thing with some differences So ill explain what I plan to do in more of a actionscript set up.....


      I plan to make a small game for my Gf's sister (she still believes in Santa)


      Heres what I need do to


      So ill have a var called Points in comp ready :


      var Points = 0;


      Then It will be a click function So lets say I have a DIV called Santa and it is clicked I want it to do this:


      var Points = +1; so it adds 1


      then sym.$("Santa").hide();


      next would be the If statement

      Something like this:


      if (Points = 3)



             Do somthing





      How would i go about this in Edge/Jquery? my jquery coding know how sucks


      Thanks in advance for any help.

        • 1. Re: If statements and vars help please :o
          resdesign Adobe Community Professional & MVP

          Hello there.


          First you need to initialize your variable.

          Then you need to increment it.

          Then you can add your conditional statements.


          Depending what you want to do and use, this should be simple.

          Are you using symbols? What does Santa do?


          Here is how it could be done


          var i=0;




               if (i==3){

                 something here


               if (i==10){

                something here