FLVPlayback component - coding custom skin buttons
Hi
I have an AS3 FLVPlayback component (2.5.0.26) with a custom skin. I have in fact just taken one of the pre-built skins and changed the artwork on one of the buttons (the 'backButton' in this case) to suit. I can trigger a function in my code when this button is pressed using:
videoPlayer.backButton.addEventListener(MouseEvent.CLICK, back30SecondsButtonClicked);
where videoPlayer is my instance f the FLVPlayback component, backButton is the button in the skin I'm targeting and back30SecondsButtonClicked the function which runs on clicking the button.
This works fine and the video seeks back 30 seconds.
However...the built in code for, in this case, the backButton executes before my custom code, so the video jumps back to the start of the video, then seeks to the correct place. This therefore flashes up the first few frames every time this button is pressed.
Is there any way of either:
- stopping the pre-built skin button code from running? I just can't seem to find where this code is hiding and am not convinced it'll be editable, or
- creating a new button in the skin and targeting it in my code. I've tried but only seem to recognise the pre-built controls and names, such as backButton, pauseButton, muteButton etc. Want to create a back30Button instance and trigger function from here.
The second option is preferable as may add other buttons and don't really want to mess with core functionality code if I can help it.
Any help or nudge in the right direction would be greatly appreciated.
Thank you, Mark