I am creating a website in Flash CS4 Actionscript 3.0?
I want to have buttons that will only exist within a "Demo_Page" section of the timeline. I have the code below which works fine for buttons that exist through out the intire timeline.
OurWork. addEventListener(MouseEvent.CLICK, clickWork);
However, when applied to the buttons that exist within the "Demo_page" section (frames 10-15) I get the error message:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
My question is, How do I let Flash or Actionscript know that this button will only exist between frames 10-14 or the "Demo Page" section"?
If you could help me out I would be eternally grateful.
The problem is you placed the script in fram1 and the button not exists in the frame1.
Simplest method to solve this is place the script in frame 10;
I tried that and it didn't work.
I have had success in adding the buttons to the first frame of the timeline just off the stage. However the buttons only work once. Any ideas?
Could you please attach your sample fla