Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 596611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:11:25+00:00 2026-05-13T16:11:25+00:00

This is my 2-part question. My understanding is small so beer with me. This

  • 0

This is my 2-part question. My understanding is small so “beer” with me.

This example counts from 1-100. I want the decimal keep counting to ten over-and over. (a.)How do I loop the decimal? 1-10 over-and-over. (b.)How to I get the whole and decimal value on the same dynamic
text field?

alt text http://www.ashcraftband.com/myspace/videodnd/icon9.jpg

THING
“It’s a counter with whole and decimal values”
-text filed receive string of whole number and decimal place
-decimal fast, whole number slow

CODE

/*I made two text fields, change the names and values, but the values didn't
respond properly. 1000 = 1 sec and 100 = 1/10th or a second. The whole thing changed.*/
//working code

var timer:Timer = new Timer(1000, 100);
timer.addEventListener(TimerEvent.TIMER, countdown);
timer.start();
function countdown(event:TimerEvent) {
    myText.text = String(0 + timer.currentCount);
}

IDEAS
(a.)
//RESET START
function countdown($evt:TimerEvent):void {
timer.reset();
timer.start();

VERBOSE EXAMPLE
if Number’s less than 11, do it again

(b.)
//STRING
var time:String =whole + “:” + decimal;

time_txt.text = countdown;

UNEXPECTED PROBLEMS
-changing values (1000, 100) didn’t work “affects the other number”
-I don’t know how I’m going to add velocity to something in the timer class “an other post”

alt text http://www.ashcraftband.com/myspace/videodnd/icon_1.jpg

THE DECIMALS STAY IN THEIR PLACE

//CA, NC, LONDON
var timer:Timer = new Timer(10);  
var count:int = 0; //start at -1 if you want the first decimal to be 0  
var fcount:int = 0; 

timer.addEventListener(TimerEvent.TIMER, incrementCounter);  
timer.start();  


function incrementCounter(event:TimerEvent) { 
  count++; 

  var whole_value:int = int(count / 100); //change value
  var tenths:int = int(count / 10) % 10;  
  var hundredths:int = int(count) % 10;  

  mytext.text = whole_value + " : " + tenths + hundredths; 
}

CRITERIA “I forgot to include 2/10/10”
WHOLES
X 10 multiples

DECIMALS
tenths dec = 10% of ones
hundreds dec = 10% of tenths dec

“thanks for the help everyone”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:11:25+00:00Added an answer on May 13, 2026 at 4:11 pm
    var timer:Timer = new Timer(100);
    timer.addEventListener(TimerEvent.TIMER, countdown);
    timer.start();
    var time = 2000;
    function countdown(event:TimerEvent) {
     time -= 1;
     var seconds = int(time/10);
     var tenths = int(time - seconds*10);
     time_txt.text = seconds + " : " + tenths;
        if (time == 0) {
            timer.stop();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a two part question, but I want to make sure the first
This is really a three-part question, but I've answered the first question myself: I'm
This is a two part question. Is it possible to take advantage of xVal
This is a two-part question: First, I am interested to know what the best
This is kinda....a two part question. The first one is much more important than
This is a 2 part question: 1) click on one of the demo dropdowns
This is probably a multi-part question. Background: we have a native (c++) library that
This is a two-part question. I'm using jQuery for a project and wanting to
This is a two part question. The first is how do you properly close
This is kind of a two part question. But it both relates to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.