Rich,


The whole idea of using the DL time to set a puppetTempo seems a 
little risky to me. What if there's some error and it takes one 
minute to DL? I think we should set an upper limit for the download 
time.

you could do something like:

--------------
dlTime = the timer -- store the timer in a variable
if dlTime > 160 then
   dlTime = 160 -- limit dlTime to max 160
end if
-- Here's the tempo inversion:
animTempo = (161 - dlTime) * 2 -- 322 >= animTempo >= 2 (theoretically)
puppetTempo animTempo -- set the tempo of the movie
--------------

(However I think 322 is to high a tempo for Director.)
Replace your 'puppetTempo the timer' line with the code above.


Good luck!
-Andreas



>dear lingoists:
>
>i'm a student and need your expertise. i'm creating an application that
>receives a text file and plays an animation based on the time it takes to
>receive that file. i've been able to successfully accomplish this in lingo
>but i need the animation to play back at a speed inverse to the time it
>takes to receive that file. As it exists, for example, if it took 120 ms to
>receive the file, the animation would play quickly and in the same respect,
>if it took 3 ms to receive that file, the animation would play slowly. I
>intend to make the animation play at it's fastest rate if the number
>received were 1.
>
>eg:
>
>the number of milliseconds it takes to receive the file is 160. this would
>be considered "slow"
>the number of milliseconds it takes to receive the file is 70. this would be
>considered "moderate"
>the number of milliseconds it takes to receive the file is 26. this would be
>considered "fast".
>
>in simple math, to be coded in lingo, how would i write a simple formula?
>
>my lingo frame script, as it exists,  for the inversion question:
>
>----
>on exitFrame me
>   if netDone() = 0 then
>     go to the frame
>     put "Not yet."
>   else if netDone() = 1 then
>     put the timer into field "timer_field"
>     puppettempo the timer * 2 -- this seems to be the line in question??
>     put netError()
>     put string(netTextResult()) into member "text_display"
>     go to the frame + 1
>    end if
>end
>---
>many many thanks if you could lend some of your expertise.
>rich
>
>
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to