Iād like to have an animated kung fu guy throwing punchesā¦to make the punch look realā¦apart from using motion tween, is there a script or technique to make it look kinda like a slow motion movement with lots of delay?
help?
Iād like to have an animated kung fu guy throwing punchesā¦to make the punch look realā¦apart from using motion tween, is there a script or technique to make it look kinda like a slow motion movement with lots of delay?
help?
Do this in each frame:
start = getTimer ();
while (start+XXXX>now) {
now = getTimer ();
}
Where XXXX is the delay in milliseconds, e.g. 1000 = 1 sec.
Maybe not the most elegant solution but with this you can tweak the delay individually in each frame, I like it a lot
Achnor
Hey Achnor, what is this supposed to do ?
pom 0]
It causes a delay? Explain what you donāt understand.
Achnor
Beware though, it occupies 100% of your CPU so better not make big delays. Iāve found delays upto 0,5 seconds to work good.
Achnor
Oh, you mean you want to keep the CPU working as long as the pause lasts ?? Thatās a little bit radical. You have some much more simple ways of doing thatā¦ Just putting a stop, timing and then going to the next frame. I didnāt try it, but it should be possible.
pom 0]
Do I sence I bit of sarcasm?
What I meant is that this script runs as fast as it can. Itās not bound by the framerate. If you have a slow computer, the script executes slow but the delay is the same as with a fast computer where the script executes fast.
If you know a better method (stop, timing?) please let me/us know.
Achnor
No sarcasm at all, really. Anyway, the method I was mentionning was made by Supra, so I canāt brag or anythingā¦ Itās a bit complicated to write, so if you want it, just tell me and Iāll send it to you.
pom 0]
Send it here: [email protected]
I have use for delay-scripts all the time and the more the merrier
Thanks
Achnor
sent.
pom 0]
Here is the delay effect result im trying to achieve. However, im doing this by āstackingā one movie on top of the other - and adjusting its alpha levels and frame position.
Iām wondering if there is a script that can be attached to a moving movie( object) that will produce similar results
thanks again
duplicateMovieClip, or you can use onion skinsā¦iām not sure about the onion skin one thoughā¦Pom might knowā¦
Give me your email address, Iāll send you the fla. And yes, Jubby, I checked the profile, it says private :lol:
Mail me at [email protected] if you donāt want to write your address on the board.
pom 0]
By the way, this has absolutely nothing to do with what Achnor and I were talking about. A bon entendeurā¦
pom 0]
hey POMā¦ you guys are always so helpful! I try to keep a folder with tips and stuff that I may use in the future. If itās some cool code, could we still post it out here somewhere?
If not, Iād still love a copy of any code (as long as I know what its supposed to do) for my records.
Thanks a million!
thanks for the code.
its very similar to the delay im talking about.- except that it moves with the mouse. Can i extract it and apply it to a movie?
Just found this code-snippet. It behaves the same way as the other A/C I posted but without hogging the CPU:
onClipEvent (enterFrame) {
if (_root.delay) {
if (_root.waitHowLong<=(getTimer()/1000)-_root.startTime) {
// Time is up!
_root.delay = false;
} else {
// Keep waitingā¦
}
}
}
:: Copyright KIRUPA 2024 //--