dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Need to delay loops in web banner - AS3

  1. #1
    Junior Member
    Join Date
    May 2015
    Posts
    3

    Need to delay loops in web banner - AS3

    I have a banner ad that has 3 loops and stops, problem is it loops through instantly, is there anyway to put a delay in-between the loops so if someone wants to click on the button they can?

    Thanks

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,785
    Hi,

    What code do you have so far, or better still attach your *.fla

  3. #3
    Junior Member
    Join Date
    May 2015
    Posts
    3
    I found what I needed... found some code that worked very well, below. Thanks for your reply, though.



    //first frame

    function playit(e:TimerEvent):void {
    play();
    }

    var Tim:Timer = new Timer(100, 1);
    Tim.addEventListener(TimerEvent.TIMER, playit);

    Insert the following on any frame where you would like to delay the animation:

    stop();
    Tim.delay = 1000; //Adjust Accordingly - 1000 Equals 1 Second
    Tim.start();

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