PDA

View Full Version : Playhead position in a movie


junihh
01-19-2006, 03:11 PM
Hello there

I'm working with a movie that have to load a banner. With a tempo script (setInterval) i make the loaded banner invisible, but firts i need to calculate the playhead position of the banner before become invisible.

Any of you know about calculate the playhead position of a movieclip loaded.

cancerinform
01-19-2006, 03:26 PM
You mean the framenumber? banner._currentframe

junihh
01-19-2006, 04:03 PM
Yes, that is what i looking for. Something like:


var numFrame:Number;
bannerMC.onEnterFrame = function() {
numFrame = this._currentframe
if (numFrame >= this._totalframes) {
this._visible = false;
delete this.onEnterFrame;
}
}


Only if the current playhead frame number and the total frames are the same, the banner movieclip loader become invisible.

You know the way to do that ???

cancerinform
01-19-2006, 04:05 PM
Enter a number for totalframes. ;)

cancerinform
01-19-2006, 04:21 PM
Actually your script works for me.

junihh
01-19-2006, 06:00 PM
Yes cancerinform, you was rigth. Thanks anyway for your help.