1 Reply Latest reply on Feb 28, 2011 7:58 AM by Ned Murphy

    loadMovieNum not working

    TheEzmonator

      Hi there, I'm in the process of making a game where when the player gets a score of 5 a movie is loaded onto the screen. The code I've tried is:

       

      if (counter==5){

      loadMovieNum("randomfact.swf", 2);

      }

       

      Counter is the name of the dynamic text that counts the score.

       

      If anyone could give any advice or a better way to do this that would be great.

       

      Thanks for your time

       

      TheEzmonator

        • 1. Re: loadMovieNum not working
          Ned Murphy Adobe Community Professional & MVP

          If counter is the instance name of the textfield, then you should be using...

           

          if (counter.text == "5"){

             loadMovieNum("randomfact.swf", 2);

          }

           

          You should try tracing the counter value before the conditional to see what value is there.  You are safer using a variable to keep count and just use the textfield to display the count value.