0 Replies Latest reply on Oct 5, 2008 5:30 PM by mchings

    Scroll Buttons Don't work

    mchings
      Hey guys, this has been giving me a headache for the past few days trying to figure it out so I hope you can help.

      I'm setting up a photo gallery with a scrolling thumbnails. So far I have all the thumbnails loaded into a movie to be able to scroll. I also imported to buttons to be able to help scroll through the thumbnails but I can't get them to work. The only way I'm able to scroll through the thumbnails is by using the arrow keys on the key board. Here is what I have.

      My first layer is the thumbnail movie layer, followed by a masking Layer. I then Have the button layer and the scroll control layer. My scroll control layer is a movie clip with 6 key frames in it:

      The first key frame is a simple stop (); action
      The 2nd key is :
      x = getProperty("_root.text.content", _x);
      if (x>100) {
      gotoAndStop(1);
      } else {
      setProperty("_root.text.content", _x, x+6);
      }

      the 3rd frame is a gotoAndPlay(2); code

      4th: stop ();
      5th:
      x = getProperty("_root.text.content", _x);
      if (x<-1600) {
      gotoAndPlay(4);
      } else {
      setProperty("_root.text.content", _x, x-6);
      }

      6th: gotoAndPlay(5);

      thats it for the control layer

      my buttons are set up with this code:

      left:
      on (rollOver) {
      tellTarget ("control") {
      gotoAndPlay(2);
      }
      }
      on (rollOut, dragOut) {
      tellTarget ("control") {
      gotoAndStop(1);
      }
      }

      right:
      on (rollOver) {
      tellTarget ("control") {
      gotoAndPlay(5);
      }
      }
      on (rollOut, dragOut) {
      tellTarget ("control") {
      gotoAndStop(4);
      }
      }

      each button only has a hit frame indicated in it I don't know if I needed to set anything else up. But when i roll over them or click on them the images will not scroll back and forth. Like I said the only way I am able to get them to scroll is by using my arrow keys on the key board, and I set that up on the thumbnail movie with the code:
      onClipEvent (load) {
      movespeed = 5;
      }
      onClipEvent (enterFrame) {

      if (Key.isDown(Key.RIGHT)) {
      this._x -= movespeed;
      if (this._x<=-1221.4) {
      setProperty ("_root.scroll", _x, -1221.4);

      }


      }
      else if (Key.isDown(Key.LEFT)) {
      this._x += movespeed;
      if (this._x>=97) {
      setProperty ("_root.scroll", _x, 97);

      and that works just fine, just not the buttons. PLEASE HELP
      Thanks