# Delay 10 seconds on every frame AS3

**URL:** <https://forum.kirupa.com/t/delay-10-seconds-on-every-frame-as3/325864>\
**Category:** Uncategorized\
**Created:** [November 9, 2011, 7:29am UTC](https://forum.kirupa.com/t/delay-10-seconds-on-every-frame-as3/325864 "2011-11-09T07:29:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryanbelle](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@bryanbelle](https://forum.kirupa.com/u/bryanbelle)\
**Post date:** [November 9, 2011, 7:29am UTC](https://forum.kirupa.com/t/delay-10-seconds-on-every-frame-as3/325864/1 "2011-11-09T07:29:42Z")

</div>

I have 40 frames on a timeline, each frame has an tweening script below:

import fl.transitions._;  
import fl.transitions.easing._;

TransitionManager.start(week\_2,{type:Fade, direction:Transition.IN, duration: 12, easing:Strong.easeOut})

And on the main timeline for the functions and buttons play/pause/next/previous is working good except, i want to delay every frame for like 10 seconds.

code below:

stop();

// button Play/Pause navigation on timeline  
stop\_btn.addEventListener(MouseEvent.CLICK, onStopClick, false, 0, true);  
start\_btn.addEventListener(MouseEvent.CLICK, onPlayClick, false, 0, true);

function onStopClick(evt:MouseEvent):void {  
stop();  
}  
function onPlayClick(evt:MouseEvent):void {  
play();

}

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

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

Tim.start();

// keyboard arrow next and previous actions

stage.addEventListener(KeyboardEvent.KEY\_DOWN,keyDownListener);  
function keyDownListener(e:KeyboardEvent){ if (e.keyCode == 39)  
{ nextFrame(); } if (e.keyCode == 37) { prevFrame(); } }

// next button script

function onNextClick(evt:MouseEvent):void {  
nextFrame();  
}  
next\_btn.addEventListener(MouseEvent.CLICK, onNextClick);

// previous button script

function onPrevClick(evt:MouseEvent):void {  
prevFrame();  
}  
prev\_btn.addEventListener(MouseEvent.CLICK, onPrevClick);

What am i missing?

Your great help will be much appreciated.

All the best,

Bryan
