A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: score

  1. #1
    aCtioNScRipTer
    Join Date
    Feb 2001
    Posts
    274
    does anyone here knows how to do this effect?

    the score is incrementing by 10 but I want it to show in such a way that i can see it increase from 0 to 10 in a very fast speed.

    For example when i shoot a bear, my score will be 10. I want to see it increase from 0 to 10. the second time i shoot a bear my score will be 20 and again i want to be able to see that it is increasing from 10 to 20.

    Any ideas??

  2. #2
    Member
    Join Date
    Jul 2001
    Posts
    88
    Originally posted by hye
    does anyone here knows how to do this effect?

    the score is incrementing by 10 but I want it to show in such a way that i can see it increase from 0 to 10 in a very fast speed.

    For example when i shoot a bear, my score will be 10. I want to see it increase from 0 to 10. the second time i shoot a bear my score will be 20 and again i want to be able to see that it is increasing from 10 to 20.

    Any ideas??
    Create and mc with a textfield score

    onClipEvent (load) {
    levelDelay=12;
    score = 0;
    i=0;
    }

    onClipEvent (enterFrame) {
    levelSpeed += 1;
    if (levelDelay == levelSpeed) {
    levelSpeed = 0;
    i=i+1;
    if (i<=10)score = score+1;
    }
    }

    if for incrementing the score again from 10 to 20 reset i=0
    To increase or decrease the speed of the loop, increase or decrease the value of levelDelay accordingly


    Enjoy

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