I modified a simple frame counter to display the frame count not in frames but in secs. Based on 24 frames a sec.
/:FrameCount24 = z;
z = _root._currentframe;
z = z/24;
That works fine. I can see the secs displayed counting up as the playhead moves along. The thing I don't like is that the counter displays the seconds like this:
Your suggestion worked great. The seconds tick off just right. I didn't know about the use of the "Math.round". I always learn something new when I visit FK. This place rocks!
Now that I'm seen the "Math.round" in action, I'm starting to wonder if you can use it to display more of the seconds. Before I had two many numbers, now I'm wondering how you bring a few back. So what I see displayed is something like:
3.8 or 3.833 (But nothing more)
instead of just "3".
Just wondering.
I go read about "Math.round" now.
Mike
if you want to show digits out to the hundredths position (x.xx), try this:
z=framerate;
z=int(z*100);
z/=100;
this basically multiplies the huge float number that you have, multiplies it by 100 (thus moving the decimal point two places to the right) converts it to an integer (hacks off everything beyond the decimal) and then divides the result by 100, which in turn moves the decimal back two places to the right, giving you a nice pretty number with only tenths and hundedth past the decimal point.
Thanks for the reply monogrey. You understand what I want the final secs to look like. Your discription is great, except I'm having trouble figuring out exactly the whole actionscript. I'm trying to apply your action code. I'm not getting it to work. Here is what I've got that works:
/:FrameCount24 = z;
z = _root.movie._currentframe;
z = z/24;
OR...
/:FrameCount24 = z;
z = _root._currentframe;
z = Math.round (z/24);
Now I'm trying to add your comments. I don't think I'm supposed to combine these like this. I'm trying to understand how to read your code... "framerate", is that to be left alone or am I to replace that with my frame rate that's 24fps.
/:FrameCount24 = z;
z = _root.movie._currentframe;
z = z/24;
z = framerate
z = int(z*100);
z/=100;
I have also tried ( cause I like guessing i guess)
/:FrameCount24 = z;
z = _root.movie._currentframe;
z = framerate
z = int(z*100);
z/=100;
in order to make this work in your context just take my last two lines of code (the only lines of code that really do anything) and tack them onto the code that you already have.
So, once everything's said and done, your script should look like so:
I was wonder if all that "z"ing related to each other. I figured it did and was wonder if it wasgetting quite out of control. Then you come in and clean it up... nice.
You know us artist, good in visual, poor in math.
Thanks again Brian for your help. I'll go test it out!
Mike