I have a series of buttons that load different movies into the same FLVPlayback. Instinctively I should be able to write one function that does that, and set it as each button's event handler for MOUSE_UP, passing the function a unique argument for each button.
But how can I pass the function an argument through the event handler? Some sites say this is not possible, is that true?
Right now, as a workaround I have each button calling a separate function, and each separate function calls the universal loading function, passing it the unique argument.
That's fine for hard-coded buttons, but what if I want to dynamically generate buttons, like from an XML file, which is what I plan to do? How would I handle this?
But how can I pass the function an argument through the event handler? Some sites say this is not possible, is that true?
Right now, as a workaround I have each button calling a separate function, and each separate function calls the universal loading function, passing it the unique argument.
That's fine for hard-coded buttons, but what if I want to dynamically generate buttons, like from an XML file, which is what I plan to do? How would I handle this?