1 Reply Latest reply on Nov 24, 2008 1:53 PM by Ned Murphy

    movie clip button navigation

    drunkwithlust
      hey, i'm pretty new to flash and i'm attempting to create a site with different scenes representing different pages.
      i have four movie clip buttons. One of these buttons should link to the "about me" page, which so far only has another movie clip with pictures. from the main page i'd like a user to be able to click on the about me button/movieclip and the pictures should appear.

      i've been using the code:

      on(release){
      _root.gotoAndPlay("about_pictures")
      }

      however whenever i run the preview, nothing happens when i click the button.

      main timeline includes :
      about me > pictures with a motion tween(pictures_about_mc) > the movie clip of pictures(pictures_mc).
      background
      buttons
      actions


      any help would be appreciated. thank you in advance.
        • 1. Re: movie clip button navigation
          Ned Murphy Adobe Community Professional & MVP
          If you are genuinely using scenes, then your gotoAndPlay() call needs to include the scene name and the frame...

          gotoAndPlay("about_pictures", 1)

          and "about_pictures" needs to be the name you assigned to that scene in the scenes panel.

          Using scenes and the way you coded the button are both not clean ways to code--things end up being hidden from plain site. Instead of scenes, just use the one maintimeline. Instead of on(release, etc) use myBtn.onRelease = function (){...} in the actions layer.

          Makes life so much easier in the long run, especially a year from now when you're trying to change some code and can't find where you hid it.