A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: if thingy....please help!

  1. #1
    Junior Member
    Join Date
    May 2001
    Posts
    3
    Hello!
    I made a platform game from mad-sci's tutorial, but I want to make it so that when the score gets to a certain amount the movie jumps to a new frame. Here's the code I'm using in the frame:

    if (score eq 8) {
    gotoAndStop (2);
    }

    it doesn't work! I just can't figure out why.
    when i pick up the item the score says 8 but nothing happens... Please help, I really need to know how to do this! ("score" is the name of the text-field that displayes the score...)

    PS. I tried this code too but it was even more screwed up than the other one
    if (score = 8) {
    gotoAndStop (2); }
    it just sets the score to 8! plz help!

  2. #2
    FK Official Postman
    Join Date
    Apr 2001
    Location
    Rockville, MD / UCSanDiego
    Posts
    827
    Maybe you want the
    Code:
    if (score eq 8) { 
    gotoAndStop (2); 
    }
    to be checked each time the object is picked up. If the line
    Code:
    if (score eq 8) { 
    gotoAndStop (2); 
    }
    is before the line that updates score, then it will not work. So, if the score updater is "X", and the score checker is "Y", then the order would be "X", then "Y".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center