1 Reply Latest reply on Jan 26, 2007 11:36 AM by dalewb

    why do button functions included in external actionscript not persist across frames?

    m a d r a
      this one drives me nuts!

      if i include an external actionscript file in frame one of my movie, then [as you'd expect] all the functions, global variables etc contained in that external AS file are available throughout my movie - with one notable exception.

      if i add a button to the stage - in a frame other than frame one - whose onRelease handler is defined in the external AS, the function is not called when the button is clicked - i have to re-include the external AS file again on the frame in which the button resides, in order for the buttons function to be called. anyone know why this is - and if there's a way round it?

      how come all the other functions in the AS persist across all frames and all timelines in the movie, but the button handlers only seem to be available on the actual frame in which the AS file is included?

      download example