Skip navigation
ifok83
Currently Being Moderated

Expression number generator

Apr 15, 2012 4:14 PM

New to expressions

 

What I have so far I have this is the text source

 

Math.round(random(100).toFixed(2))

 

Which gives me randomly generated numbers without a decimal

 

What I need

Fixed characters right after those numbers

The numbers to stop on a set value at a set moment

Also how would I do a countdown (instead of random) and adjust the speed of it.

 
Replies
  • Currently Being Moderated
    Apr 15, 2012 10:14 PM   in reply to ifok83

    You could just tie your math round function to a slider and a multiplier. It should be very easy to figure out. Then just animate the slider.

     

    V = slider value;  (pickwhip to the expression slider)

    Math.round(V)

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2012 10:42 PM   in reply to ifok83

    You sound confusing. Does you countdown need to have any randomness? If not, Dan's solution would be as simple as it gets. If you need randomness, you could still use it and simply add your randomness, but you'd need a second slider for the randomness intensity, so you can stop it when you need to...

     

    Mylenium

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 17, 2012 3:01 AM   in reply to ifok83

    Basics of JavaScript - string concatenation. Anything additioanl goes in quotation marks and is added:

     

    Math.round(V)+"%"

     

    Mylenium

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points