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