3 Replies Latest reply on Oct 4, 2009 11:18 PM by webqaflash

    Buttons existing within a segment in a timeline


      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);

                function clickWork(evtobt:MouseEvent){


      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.
          at index_fla::MainTimeline/frame1()


      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.
      Thank you