A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: When score = 100 continue??

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    2

    When score = 100 continue??

    I have a snake game,
    all i need is to make the link at the end....
    i want the game to link to a new scene if the player dies with
    a score greater than 100...

    so far i have if (tscore > 100){
    gotoAndPlay("Scene Name",1)
    }

  2. #2
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    don't use scenes, they're a pain in the neck.
    as far as i know, you can only jump to scenes from the main timeline. so i'd suggest you put a function on the main timeline such as this:

    function gotoScene(sname, sframe){
    gotoAndPlay(sname, sframe);
    }

    and then call that function in your code posted above:
    if (tscore > 100){
    _root.gotoScene("Scene Name",1)
    }
    Please sign here

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