3 Replies Latest reply on Apr 11, 2014 4:08 AM by Ned Murphy

    Score Carry forward to next frame

    mandar vedak Level 1

      dynamic text field instance name is "tfm"

       

      when after the complete game score is not view

       

      function updateScore(amount)

      {

                score = score + amount;

                score_txt.text = "Score is" + score;

       

                if (score <= 0)

                {

                          tfm.text = "00";

                }

                else if (score == 15)

                {

                          tfm.text = "10";

                }

                else if (score == 30)

                {

                          tfm.text = "20";

                }

                else if (score == 45)

                {

                          tfm.text = "30";

                }

                else if (score == 60)

                {

                          tfm.text = "40";

                }

                else if (score == 75)

                {

                          tfm.text = "50";

                }

                else if (score == 90)

                {

                          tfm.text = "60";

                }

                else if (score == 105)

                {

                          tfm.text = "70";

                }

                else if (score == 120)

                {

                          tfm.text = "80";

                          congo.gotoAndPlay(2);

                }

      }