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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No time to figure it out... 1

Status
Not open for further replies.

N3XuS

Programmer
Mar 1, 2002
339
BE
How can I make a loop loop every 50ms e.a.
I want to move something at a steady rate.
Actually making a gearbox for a car. Maybe there's easyer ways to do it?

Thx, N3XuS
 
Did you try modifying the movie properties?
fps?
Or setting frame speed in one movie and then put it inside another movie?
 
You could use a timer to trigger a regular event, atach the following to your target movie clip:

onClipEvent (load) {
// get current time
triggerTime = getTimer();
// add 50ms delay
triggerTime += 50;
}
onClipEvent (enterFrame) {
// check current time
timeNow = getTimer();
if (timeNow>triggerTime) {
// trigger event e.g. move across screen
this._x += 10;
// reset timer
triggerTime += 50;
}
}

This script will be more accurate if your movie has a faster frame rate. Slainte

 
k guess that'll work many thx for the help =-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top