anyone knows how make a delay in flash?
  • 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?


  • 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]


  • 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 ilyas.usal@club-internet.fr if you don't want to write your address on the board.
    pom 0]


  • sent.
    pom 0]


  • 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


  • 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.

    www.skillfish.com/delay.swf (http://www.skillfish.com/delay.swf)


    I'm wondering if there is a script that can be attached to a moving movie( object) that will produce similar results


    thanks again


  • 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


  • Send it here: achnor@gmx.net

    I have use for delay-scripts all the time and the more the merrier :-)

    Thanks

    Achnor


  • 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...
    }
    }
    }

    Source:
    www.actionscript.org/tuto...ndex.shtml (http://www.actionscript.org/tutorials/intermediate/delaying_events/index.shtml)


  • 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]


  • duplicateMovieClip, or you can use onion skins...i'm not sure about the onion skin one though...Pom might know...


  • By the way, this has absolutely nothing to do with what Achnor and I were talking about. A bon entendeur...
    pom 0]


  • 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?


  • Hey Achnor, what is this supposed to do ?

    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


  • 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!

    Iammontoya@yahoo.com


  • It causes a delay? Explain what you don't understand.

    Achnor







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about anyone knows how make a delay in flash? , Please add it free.
    | More »