Results 1 to 2 of 2

Thread: SetInterval and so.addVariable

  1. #1
    Join Date
    Sep 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default SetInterval and so.addVariable

    Hi, I recently did a project and I couldn't figure this part out (I'm still a newb to actionscript programming). I have this code ...

    clearInterval(nDelayID);
    stop();
    var nDelayID:Number = setInterval(this, "pause", 4000);
    // where 4000 is 4000 milliseconds
    function pause():Void {
    clearInterval(nDelayID);
    play();
    // or nextFrame();
    }

    I want to provide the control (to set the pause outside of Flash) ... Basically, I want to add ...

    so.addVariable("pause", "4000");

    But, I know I need to re-code both the SetInterval and So.AddVariable - I don't know how to do it. Any help showig me the change and explainig what you did (so, I learn it) would be appreciated. TY.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •