A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Changing from one scene to another without buttons

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    1

    Unhappy Changing from one scene to another without buttons

    Hello!
    I'm creating a game in which you have to click/shoot the correct number as it passes by and when the scoreboard reaches 2 certain scores I need the scenes to change.

    I've managed to make it work for one scene where when the score hits 10 it changes to the next part of the game. However I also need to make it so that when the score hits -5 the scene changes to the "Final Score" scene where the player is taken if they lose.

    When I tried to use the same script I used the first time I just didn't know where to place it and it didn't work.

    PLEASE HELP

    How can I have 2 scripts working on the same timeline so that if the score reaches 10 the game proceeds but if it reaches -5 the game ends?

    I'm new to flash and i'm just sooooo confused!

    thank you so much.

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    please post your code...

    it will help in the real implementation.


    however.. its really as simple as an IF/ELSE statement..


    somehow, somewhere..you are checking the score (after every attempt..or whatever)


    Im not sure if you are storing this value in a variable..or just in the text field.


    but it would be similar to this:


    if(userScore = 10){
    gotoAndPlay('winner scene');
    }else if(userScore == -5){
    gotoAndPlay('looser scene');
    }

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