8 Replies Latest reply on Sep 26, 2006 4:23 PM by sheep-ish

    More confusing than the Matrix

    sheep-ish
      I am creating a website that has a scrolling panel of thumbnails, and I'm trying to make it so that when you click on a thumb, you go to a new window with a larger version of the image in it.

      Everything is working apart from the thumb_12 action. I have treated it the same as the links at the bottom of the page (they work fine), but this isn't. Is it because it's in a scrolling panel?

      I'm new to all of this, so any help would be great.

      Dave

        • 1. More confusing than the Matrix
          coldMiner Level 1
          Maybe it is a path problem?
          Is thumb_12 inside the movieClip "panel"?
          if so, then the correct code is:
          panel.thumb_12.onRelease = twelve;

          another thing, if a function is only used by one movieClip,
          then it is better to code it like this:
          freerange.onRelease = function () {
          getURL(" http://www.theroost.co.nz/free_range.html");
          };
          so when you:
          delete freeRange, or freerange onrelease, you also deletes the function etc.
          -----------------------------
          Or when you have many mc's with "links-clicks" etc you can do something like this:
          function linkMe(who:MovieClip, where:String):Void{
          who.onRelease = function () {
          getURL(where);
          };
          // usage:
          linkMe(freerange," http://www.theroost.co.nz/free_range.html");
          linkMe(contactus," http://www.theroost.co.nz/contact.html");
          // etc
          // easier to read...
          • 2. Re: More confusing than the Matrix
            sheep-ish Level 1
            I thought you had it there!

            You're right in that the thumb_12 button is inside the movieClip "panel" so you're code makes sense, but unfortunately it doesn't work.

            Do you know if I have it in the right location within the code?
            • 3. Re: More confusing than the Matrix
              coldMiner Level 1
              If thumb_12 is a pictureholder, lets say you load å jpg inside it:
              thumb_12.loadMovie("thumb12.jpg);
              you destroy the onRelease action.
              You must put the onRelease action after the picture is loaded.

              If not make sure that thumb_12 exist when you put the onRelease code to it.
              if you have the onRelease code in frame 1, and thumb_12 enters the stage in frame 2,
              then it have no onRelease action...
              • 4. Re: More confusing than the Matrix
                sheep-ish Level 1
                Thanks for the reply ColdMiner. The page in question is

                http://www.theroost.co.nz/picture_this.html

                The whole page is only one frame long, with movie clips for each animation on individual layers, as well as an action layer.

                thumb_12 is only one of the images (once I get this cracked I will apply it to the other 11 images).

                As the movieclip "panel" is always on, I though that the individual buttons contained in it would always be available for instruction. Is this not the case?
                • 5. Re: More confusing than the Matrix
                  coldMiner Level 1
                  Sounds weird...
                  But first of all, you'r thumbs in the panel are not MovieClips but buttons,
                  but then again that should be ok...
                  Are you sure that you have named thumb_12....

                  Try putting this code directly on the thumb_12 movieclip (just for testing):
                  on(release){
                  trace("Who: "+this+" | Name:"+this._name);
                  }
                  // u have to select the thumb_12 moviclip, and enter the code in the
                  // actionscript panel
                  • 6. Re: More confusing than the Matrix
                    sheep-ish Level 1
                    You were right coldMiner, while 'thumb_12' was called 'thumb_12' I hadn't given it an instance name of 'thumb_12'.

                    DOH!!

                    Now your original comment of 'panel.thumb_12.....' works perfectly (and the house keeping comments nice as well)

                    Thanks for your patience.

                    Now to make the new window a cetain size with no scrollbars etc. Any tips?
                    • 7. Re: More confusing than the Matrix
                      coldMiner Level 1
                      Why pop-up?
                      Load the high resolution image in the Flashmovie.

                      With your JavaScript the picture pop-up in a little window on my monitor
                      on the left - while I'm looking at your website on my monitor on the right.
                      Not an elegant solution...
                      • 8. Re: More confusing than the Matrix
                        sheep-ish Level 1
                        Your'e right it isn't very elegant. I'm going to get this version of the site up and running, and then go back and refine it - possibly altering the design of the page to incorporate the larger images.

                        This has been my first real experience with flash, so it has just been one big learning curve.

                        Dave