I am VERY new to this as the last time I dealt with ActionScript was with Flash MX, so please be gentle with me.
I am getting to grips with the basic concept of listeners and am OK with the concept. I have a project where buttons appear at various times on the timeline. One of the things I have noticed is that if I put multiple functions at frame1, I quickly picked up that if the button included in the function did not appear until say frame 77 then I get an error as the script appears not to be able to reference the button. (I assume that this is because it's not on the stage yet?)
So my question is - Is there a way of using error handling within the script so that if the button can't be found then the function is skipped and it moves to the next function, a bit like On Error Resume Next in VB?
I would ideally like to just have one layer with a single script containing all the functions for all the buttons.
Below is what I am using at the moment (here there are just three entries, but I anticipate when done there will be 10 or so)
I hope I am making sense??