// currentTime
var currentPlayerTime = 0;
// Blank MovieClip
var timeLineEdit:MovieClip = new MovieClip();
MovieClip(root).addChild(timeLineEdit);
// 60 seconds
var movieDuration:Number = 60.5;
// Looping through
for(var j = 0; j<Math.ceil(movieDuration); j++){
// instance of timeline MC
var timeLineMC:timeLineClass = new timeLineClass();
timeLineMC.timeLineX.text = j+1;
// create bitmapData of timelien MC
var timeLineBMD:BitmapData = new BitmapData(timeLineMC.width, timeLineMC.height);
timeLineBMD.draw(timeLineMC);
//make MC width of movie in seconds
timeLineEdit.graphics.beginBitmapFill(timeLineBMD);
timeLineEdit.graphics.drawRect(j*timeLineMC.width, 0, timeLineMC.width, timeLineMC.height);
timeLineEdit.graphics.endFill();
}
stage.addEventListener(Event.ENTER_FRAME, EnterFrame);
function EnterFrame(e:Event):void{
// simulating player
currentPlayerTime = currentPlayerTime + (1/30);
// Moving timeline base on currentPlayerTime
timeLineEdit.x = -((timeLineEdit.width/movieDuration)*currentPlayerTime);
}
I would appreciate any help at all.
Basically, I have a 800px width image thats represent one second in the movie.
Ex. 60.5 seconds of a movie should have a timeline 48,400px (timeLineEdit)
but, for some reason at the 42 seconds mark or 33,600px mark the timeline stop moving...
Extra Info:
The timeLineClass is a MC which is a timeline with a dynamic text that correlate to the seconds of the movie test.png