A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Help on timer

  1. #1
    Your Mom
    Join Date
    Jan 2005
    Posts
    84

    Help on timer

    how do you make a timer for 6 minutes
    hi

  2. #2
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    whaddaya want? a timer counting upwards/downwards? a command that calls a function after 6 minutes?

    counter:
    Code:
    var inter:Number;
    var minutes:Number = 0;
    var seconds:Number = 0;
    function showCounter():Void{
    if (seconds==60){
    seconds = 0;
    minutes++;
    }
    if (minutes == 6){
    clearInterval(inter);
    }
    textFieldName.text = minutes +":"+seconds;
    seconds++;
    }
    showCounter();
    inter = setInterval(showCounter, 1000);
    call after 6 minutes:
    Code:
    var inter:Number = setInterval(myFunction, 3600);
    function myFunction():Void{
    trace("Six Minutes are over");
    clearInterval(inter);
    }
    Please sign here

  3. #3
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    Quote Originally Posted by theTick
    whaddaya want? a timer counting upwards/downwards? a command that calls a function after 6 minutes?
    Hey!
    I have developed a .FLA using the script given in your post, and I am attaching the same. This .FLA seems to be OK!
    PLease give your comments.
    Thank you!
    Last edited by Eager Beaver; 08-19-2007 at 02:22 PM.
    <signature removed by admin>

  4. #4
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    no .fla attached...
    [edit] there it is...
    Please sign here

  5. #5
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    911
    could you open the fla?
    It was developed in FLASH8
    <signature removed by admin>

  6. #6
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    everything works fine for me...
    Please sign here

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