A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Score Counting

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    8

    Score Counting

    Hello,
    I have reduced the weight of my flash file to under 300KB so this is a very basic version of my game.

    My problem is with score counting, i have a score field, a main character and 5 coins.

    When the character collides with the coin the following happens:
    1. The coin disappears (Supposed to happen)
    2. Adds 1 point to the score (doesn't work the way it should)

    What happens is (i have set the score field to start at 0 with (_root.score = 0 this for some reason doesn't have any affect.

    Only the first coin to be hit adds (1) to the score, after hitting a second it completely disappears.

    I Also have it set so that if the score goes to 5, the door in the top left will open. (NOTE: for some reason this seems to work, if you "collect" all the coins the door will open, but the SCORE field doesn't show the number)

    I am using ActionScrip 2.0
    and Adobe Flash CS5

    NOTE: the fla is a CS5 file, as saving it as a CS4 file was about double the size.
    Attached Files Attached Files

  2. #2
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    You need to embed numeric values in the textfield. Should work fine after that.
    Wile E. Coyote - "Clear as mud?"

Tags for this Thread

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