1 Reply Latest reply on Nov 6, 2008 9:29 AM by kglad

    frame buttons won't work

      Hi! I'm just a newbie and I got a problem with my buttons on flash site.I'm using Macromedia Flash MX.What i'm trying to do here is a site with no standard menu bar.I want my buttons to appear each on it's individual frame.What i got so far:

      > AS: content_mc.gotoAndStop("start");
      content_mc.get_in.onPress = function(){content_mc.gotoAndStop("home")}
      content_mc.start_butt.onPress = function(){content_mc.gotoAndStop("1st_page")}
      content_mc.aboutus_butt.onPress = function(){content_mc.gotoAndStop("about_us")}
      > content_mc-Movie Clip(instance:content_mc)
      |________________ >> bg-layer
      |________________ >> script-layer>>>as: stop();
      |________________ >> labels-layer>>>frame1(instance:start)
      |_________________________ >>>frame30(instance:home)
      |_________________________ >>>frame60(instance:about_us)
      |_________________________ >>>frame90(instance:1st_page)
      |_________________________ >>>...
      |________________ >> conent-layer>>>>frame1>text
      |______________________________ >>>>get_in-button(instance:get_in)
      |_________________________ >>>frame30>>>>text
      |______________________________ >>>>start_butt-button(instance:start_butt)
      |______________________________ >>>>aboutus_butt-button(instance:aboutus_butt)
      |_________________________ >>>frame60>>>>text
      |______________________________ >>>>next_button-button(instance:next_button)
      |_________________________ >>>....

      When i run it, i click on get_in button and get's me to "home" frame.But now on, buttons won't work(start_butt and aboutus_butt ) what can I do?I tried writing the AS for each button on each frame still not working.Just first button works.IF I create a menu bar with all the buttons in the main scene all works.they all get me to the respective frame but i don't need that bar.Can u help me?
        • 1. Re: frame buttons won't work
          kglad Adobe Community Professional & MVP
          all objects must exist when you reference them with code. so, if you have a movieclip (say, start_butt) and it doesn't exist unless the playhead is between frames 30 and 60, you can only define mouse handlers (like onPress) when the playhead is between 30 and 60. and when the playhead leaves those frames, you're handlers no longer exist even if you re-enter those frames (unless you re-execute the handler code).