3 Replies Latest reply on Jan 24, 2008 7:28 AM by rafa@mediatech

    Button effect

    rafa@mediatech Level 1
      Hello everyone:
      Any ideas on how to create that cool button effect found on Tiger and Leopard OS? You know, where the icon zooms in as you get closer to it, and zooms out as you go away.There are a bunch of tutorials on how to do it in flash, but nothing on Director. I understand that I should stick to doing as much as I can in Director and stay away from combining the two of them.

      Thank you,
      Rafael.
        • 1. Re: Button effect
          Level 7
          Actually, using flash buttons in Director works quite well generally.
          If you can make the effect you want in Flash and bring those buttons
          into Director, it should work pretty seemlessly.

          Alternately, to do that effect, you need to know where the button is and
          where the mouse is. Calculate the distance between them and adjust the
          scale of the button accordingly. A script on the button that looks like
          this would find out where it is:

          myLoc=sprite(me.spriteNum).loc

          and you can find the mouse location like this:

          cursorLoc=the mouseLoc

          • 2. Button effect
            Chunick Level 3
            Awhile back, I wrote an implementation of the OSX Dock for someone on one of the other forums. here's a link to an example file you can download:
            Mac OSX Dock Code File

            to see it in action:
            Mac OSX Dock Example

            There's a really nice implementation of it using flash:
            Flash Example

            ... but I like mine better. It's less frenetic.
            • 3. Re: Button effect
              rafa@mediatech Level 1
              Chunick:
              Thats really cool!, I like the Director one better to. What I am trying to accomplish is the same effect but with buttons that would be located on the left or right side of the screen. You have given me the tool, I guess I just have to play around it to get the desire effect. Thanks!!

              Rafael.