Need help with adobe flash - ActionScript 2.0

Discussion in 'Programming' started by ShadyLady, May 4, 2009.

  1. #1
    Hi guys!

    I need help from someone who knows how to use Adobe Flash - ActionScript 2.0

    Help is needed primarily on:

    1) How to create a timer
    2) Re-ordering frames and displaying certain frames for a certain amount of time
    3) How to add a 'score' and make it increase when an object is collected...


    You MUST have MSN

    If you know ActionScript 2.0 and are happy to help me then please add me on msn:

    THANKS :)

    [I'm from the UK by the way so times that we're online will vary of course...]
     
    ShadyLady, May 4, 2009 IP
  2. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #2
    its for a game I'm trying to create....
     
    ShadyLady, May 5, 2009 IP
  3. higreg7

    higreg7 Peon

    Messages:
    469
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    higreg7, May 5, 2009 IP
  4. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #4
    half the results go to some next pages :|

    I've tried google search but ain't found anything easy to understand or relevant
     
    ShadyLady, May 5, 2009 IP
  5. higreg7

    higreg7 Peon

    Messages:
    469
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok, I'll help you with that just for fun, but let's do it 1 by 1.

    About the timer, what exactly do you want it to do?
     
    higreg7, May 5, 2009 IP
  6. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #6
    thanks :D

    well I'm creating a game.. and I want the time to be displayed on the top of the screen (2nd scene).

    All I want is a timer. Want it to count down from 100 seconds and when it's at 50 seconds a 'sound' to play to warn that there is only 50 seconds left [will have to get that somehow] and when its at 0 seconds my third scene should display [the 'time's up - retry' scene which I've already got sorted] :)
     
    ShadyLady, May 5, 2009 IP
  7. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #7
    anyone not know?

    realy need some help! :(
     
    ShadyLady, May 7, 2009 IP
  8. higreg7

    higreg7 Peon

    Messages:
    469
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    There you go, file attached. It's a simple timer code, there is a sound embeded that plays at 50, and it should go to the next scene when at 0.

    Hope this helps.
     

    Attached Files:

    higreg7, May 8, 2009 IP
  9. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #9
    thank you.

    I will test it out and post back with feedback ;)
     
    ShadyLady, May 8, 2009 IP
  10. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #10
    hey. Its just what I wanted BUT when I add the code to the scene where the actual game-play is, it doesnt work. :confused:
    It just says '100' but doesnt do the countdown...

    this is my current code. I just placed the timer code under the 'onenterframe' function....

    would appreciate your further help.

    Thanks in advance.
     
    ShadyLady, May 8, 2009 IP
  11. higreg7

    higreg7 Peon

    Messages:
    469
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    You can't put this code in an onEnterFrame event, onEnterFrame basically means "all the time" or "permanently", meaning that you keep resetting your counter to 100, 30times per second, that's why it's not moving, take the code out of the onEnterFrame function ;-)
     
    higreg7, May 9, 2009 IP
  12. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #12
    oh right.

    So how do I keep it in the code for the same scene but OUT of the enterframe function?
     
    ShadyLady, May 9, 2009 IP
  13. higreg7

    higreg7 Peon

    Messages:
    469
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #13
    higreg7, May 9, 2009 IP
  14. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #14
    ^ thanks for that

    got it working ;)

    also solved the problem of re-ordering frames and displaying them for x amount of seconds before moving onto the next scene.

    just the high score thing now...
     
    ShadyLady, May 9, 2009 IP
  15. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #15
    need help on the following now.... did all the rest :)


    HOW DO I PAUSE A GAME ON BUTTON PRESS? [player will click 'options' button during the game play. This will pause the game and display the options menu; continue game, restart game...etc.]

    HOW DO I RESUME THE GAME TO WHERE IT LEFT OF FROM WHEN CLICK 'CONTINUE GAME' BUTTON?

    HOW DO I CLOSE THE .SWF FILE ON A BUTTON PRESS?
    i've trie window.close(); and the fscommand ("quit") thing but doesnt work :|

    help? please?
     
    ShadyLady, May 22, 2009 IP
  16. ShadyLady

    ShadyLady Active Member

    Messages:
    775
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #16
    still require help! anyone? :) Would appreciate it
     
    ShadyLady, Jun 7, 2009 IP