Flash Tutorial 4 How to end a game by Score or Time Limit.

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,460
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 27, 2010

This is the Action Script needed to complete this tutorial:

1st Action Script On Screne 1:

if (total ==20) {

gotoAndPlay(4);

}

2nd Action Script on frame 12 of Movie Clip "time_mc":

time_txt.text = Number (time_txt.text)-1;
gotoAndPlay(1);


3rd Action Script on frame 1 of Movie Clip "time_mc":

if (time_txt.text ==0) {

this._parent.gotoAndPlay(5);

}

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (Flashthingy)

  • I re-made this tutorial as well as Tutorials 1, 1a & 3. They are called Tutorials 1, 1a, 3 & 4 ReDo’s. The code and layout is different. These Tutorials will work on both Flash Pro 8 as well as CS5.5 (use the Flash 8 Player and Action Script 2 settings as shown in the video).

  • I do not know how to program CS5. The code you are talking about is in the TIME movie clip. I believe it actually says "this._parent.gotoAndPlay(5);" not frame 1. If this is correct try removing the word "this" and the period ".". Here is the new action script "_parent.gotoAndPlay(5);". This will work on Action Script 2, no idea about CS5. If it does not work you will have to learn how the return to scene 1 from a movie clip, it is a must if you plan to go any further. Good Luck

  • Make 3 movie clips; player_mc, flag_mc and GameOver_mc (make sure frames 1 and 2 of GameOver movie clip have the action script "stop();". Put the rest of Game Over images what ever on frame 2. Write this action script on scene 1.

    if (flag_mc.hitTest(player_mc)) { GameOver_mc.gotoAndPlay(2); }

see all

All Comments (8)

Sign In or Sign Up now to post a comment!
  • hi, great tutorial. I am having problems because I am using Flash CS5.5 and it is telling me that this._parent.gotoAndPlay(1); function is not available and to use Display Object but I dont understand how to do it can you please explain it thanks .

  • im making a platform game in cs5, at the end of the course theres a flag,how do i make it go to the 'game over' slide when the player jumps on it/touches it

  • good tut, but how do i make it so when the score is reached all MovieClips stop?

  • Good vid man

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more