Im trying to put a skip button for a video I have in flash, that when clicked it will go to the 99% bit of the video, and then when 100 the complete fucnction will be called to close it down.

Ive dragged the button from the component library and have named it my_fwdbttn, and put this code in the actiosn panel:

Player.forwardButton = my_fwdbttn;

var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
Player.seekPercent(99);
};
Player.addEventListener("ready", listenerObject);

listenerObject.fastForward = function(eventObject:Object):Void {
trace("fastforward event; playhead time is: " + eventObject.playheadTime);
};
Player.addEventListener("fastForward", listenerObject);

Im struggling to get any sort of control over it, in that the code seems to run itself without any control.

Can anybody help me here

Lee