5 Replies Latest reply on Oct 9, 2006 4:05 AM by aniebel

    Button works...but not movie???

    oicdn
      I made a movie as a mask over buttons(so I can just cut/paste/resize), and I know it works, as it works on my website:

      http://www.getlocalized.com

      You'll see whenever you hover over an image the shimmer happens.

      So I made an entirely new document and want to do the same thing. Thumbnails are on the first frame, with the image I'm trying to link to on the 5th. Below is the code:

      on(rollOver) {
      this.gotoAndPlay("s1");
      }
      on(rollOut, releaseOutside) {
      this.gotoAndPlay(_totalframes-_currentframe);
      }
      on(release) {
      gotoAndStop(5);
      _root.main.gotoAndPlay("s1");
      }

      Why won't it work? If I convert the actual image to a button and use

      on(release) {
      gotoAndStop(5)
      }

      It works, but the movie won't. The movie shimmers and works, but it's not linking...I click and it does nothing....

      Any insight?
        • 1. Re: Button works...but not movie???
          aniebel Level 2
          Hi there. Question... is this frame 5 where the big image is on the main timeline? Which timeline is the frame labeled "s1" on?
          • 2. Re: Button works...but not movie???
            kglad Adobe Community Professional & MVP
            your leaf effect works pretty well, amy.
            • 3. Re: Button works...but not movie???
              oicdn Level 1
              S1 is on the timeline of the button/shimmer movie. It's the actual shimmering.

              Frame 5 is the large picture.

              All I was doing with the shimmer was copy/pasting over images then just changing the frame it navigates to. It's wierd, cause it never caused me problem on the website.

              What's killing me is the fact that the gotoAndStop/linking script isn't working. I get no errors when I test the movie, the linking to the specified frame just doesn't work...
              • 4. Re: Button works...but not movie???
                aniebel Level 2
                Aight... try changing to this:

                on(release) {
                this._parent.gotoAndStop(5);
                _root.main.gotoAndPlay("s1");
                }

                Assuming that the big picture is on the main timeline, that should work. If frame 5 of the big picture is in another clip placed on the stage on the same timeline as the button, then you'll have to specify that (ie: this._parent.bigPic_mc.gotoAndStop(5);). Your script was telling the button to go to frame 5 of itself and stop.
                I'm a little confused about the shimmer clip. Is the instance name of it "main"? The way you described it, you don't need the "_root.main" bit in there. You can simply put:

                this.gotoAndPlay("s1");

                so then your code would read as:
                on(release) {
                this._parent.gotoAndStop(5);
                this.gotoAndPlay("s1");
                }
                • 5. Re: Button works...but not movie???
                  aniebel Level 2
                  Thanks, kglad. Thanks to your help! I am actually rethinking it again since it causes the CPU to max out when the animation plays. I may try a particles effect, using _alpha variable and slight change in _x and _y. I'm not sure if I can get it to work as I intend tho. :)