A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: setInterval and onEnterFrame in mx

Threaded View

  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    87

    setInterval and onEnterFrame in mx

    Hi guys
    I have 3 mcs on stage and this script in frame 1 that draws a line between them.
    code:

    stop();
    function draw() {
    mc.clear();
    mc.lineStyle(0, 0x000000, 60);
    mc.moveTo(h1._x, h1._y);
    mc.lineTo(h2._x, h2._y);
    mc.lineTo(h3._x, h3._y);
    }
    setInterval(draw, 2);


    the setInterval is allways on.
    After the animation plays on button i have the next script that plays the scene back
    code:

    on (release) {
    _root.onEnterFrame = function() {
    _root.prevFrame();
    if (_root._currentframe == 1) {
    delete _root.onEnterFrame;
    }
    };
    }



    The problem is that when the scene plays back the lines remain behind


    If anyone have anyideas how 2 make this one work please help.

    Thank You
    Last edited by maydays; 06-27-2005 at 08:45 PM.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center