A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: loops

Hybrid View

  1. #1
    my brain is mush
    Join Date
    Mar 2005
    Location
    Glasgow
    Posts
    40

    loops

    i was trying to make a countdown loop.

    It counts down and when it gets to a certain number it moves to the next frame. How do i do this with the actions only on the one frame?

  2. #2
    Member
    Join Date
    Jun 2005
    Posts
    71
    add this script in ur first frame.
    function mytrace() {
    a = i;
    i++;
    if (i > 20) {
    gotoAndStop(3);

    }
    }
    setInterval(mytrace, 1000, "This is a test!");

    add i=0; in the other layer but in the first frame

  3. #3
    my brain is mush
    Join Date
    Mar 2005
    Location
    Glasgow
    Posts
    40
    the problem is i need to see the numbers count down in a dynamic text box, i'm also using really high numbers so it needs to count down in large jumps, i.e. counting down from 6,000,000 to 470,000 then going to another frame to have some text appear, then the count down would be from 470,000 to 19,000.

  4. #4
    Member
    Join Date
    Jun 2005
    Posts
    71
    in this script u can see the count down in the output.make the dynamic textbox variable name to a.if u want the counts start from 6,000,000 assign i=6,000,000.
    and replace i++ by i--
    and 20 by 470000

  5. #5
    my brain is mush
    Join Date
    Mar 2005
    Location
    Glasgow
    Posts
    40
    thanks. that works

  6. #6
    Member
    Join Date
    Jun 2005
    Posts
    71
    oh happyya.have a nice day.

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