Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beating heart with variable heart rate? 1

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
Okay everyone. Put your thinking caps on.

I need to create a beating heart. I need to be able to have control over the heart rate... and therefore, the speed at which the heart beats.

Any clever ideas?
 
What about making an MC of the "beat" (I presume you mean a heart beating, not an ECG readout?), and script it so that you can set the timing in between "beats" (the movieClip playing). For example, make the beat last 1/4 of a second (3 frames at 12 fps), and set an interval between each beat as 1/4 of a second (or thereabouts - it won't be exact) by using getTimer() to retrieve the number of milliseconds passed / 1000.

You could even make it more "realistic" by creating a beat interval and a pulse interval ... when the heart beats you get 2 beats close together, one for blood in and one for blood out, don't you? then there's a longer gap in between pulses. So set 2 wait periods, the second longer the the first, and alternate between the two!

I should really get a life now, shouldn't I ... ?

If you want any help, let me know and I'll see if I can come up with anything. Right now I'll just shuffle back into my box :/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top