Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2005
    Location
    Bournemouth
    Posts
    5,389
    Tokens
    2,166
    Habbo
    Meanies

    Latest Awards:

    Default Flash/Actionscript help

    I need a quick bit of help..

    I want the txtLifeLost part to disappear after 5 seconds from when it appears but can't work out how


    Code:
    if(mcBall._y >= Stage.height-mcBall._height){
                lives --;
                txtLifeLost.text = 'Lives remaining:  '+lives;
                ballXSpeed *= 0;
                ballYSpeed *= -1;
                mcBall._x = 280;
                mcBall._y = 354.4;
                mcPaddle._x = 252;
                mcPaddle._y = 362;
                }
    Thanks!

    cake


  2. #2
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default

    Presumably you are working at 12FPS. Firstly create a new Movieclip called Life_Lost and create one giant long frame from 0-60 frames, in this frame put your txtLifeLost. Create a blank frame on the 61st frame and in the Actions put "Stop();".

    So when you loose a life you can say GotoAndPlay(1); and it will stay up for 60 seconds.

  3. #3
    Join Date
    Jun 2005
    Location
    Bournemouth
    Posts
    5,389
    Tokens
    2,166
    Habbo
    Meanies

    Latest Awards:

    Default

    Thanks!
    I'll try it out over the weekend and try it out
    btw, it's at 24fps if that'll make any difference?

    cake


  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by infrequent View Post
    Thanks!
    I'll try it out over the weekend and try it out
    btw, it's at 24fps if that'll make any difference?
    Just do

    the frames per second x amount of seconds you want it up there

  5. #5
    Join Date
    Jun 2005
    Location
    Bournemouth
    Posts
    5,389
    Tokens
    2,166
    Habbo
    Meanies

    Latest Awards:

    Default

    Quote Originally Posted by Blob View Post
    Just do

    the frames per second x amount of seconds you want it up there
    Okay, thanks
    +rep to both too!

    cake


  6. #6
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default

    120 Frames . Thats how I always do timers in Flash anyway.

Posting Permissions

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