3 Replies Latest reply on Jul 13, 2006 7:57 PM by Jim_Esteban

    writing actionscript for loading images HELP

      I’m using flash 8. I would like some help with action script I suck. I have created 12 buttons name button_1 2, 3, and so forth. I would like on rollover for a small image to appear on the stage. 12 images named “invitation_1.gif”, 2, 3, 4 and so forth. I only want the image to appear during the rollover. When the button is pressed I want a flash movie to load on the stage. Any help would be greatly appreciated
        • 1. writing actionscript for loading images HELP
          Alright i took a stab at it. For this situation i might suggest using some actionscript to make your life easier and make all the buttons and handlers and what not for you.

          to get this to work, you need a symbol in your library that has a text field called "textField" and it has to have the linkage name "button" and it needs to have some kind of background graphic. and obviously you have to have the gif next to the flash file. AND call the thumbnail graphics thumbnailInvitation_1.gif , 2, 3 etc.

          You can see at the end that i was doing some weirdo things like using the name to store "i" with the movie clips, and then using the number() function to pull it back out and create the filename.
          • 2. Re: writing actionscript for loading images HELP
            net1 Level 1
            Thanks, fikshin

            I will give it a try thanks for all your help
            • 3. Re: writing actionscript for loading images HELP
              Jim_Esteban Level 1
              If you use the MovieClipLoader.loadClip instead of loadMovie then you can use the onLoadInit event to resize your image, other wise you won't know when the image is fully loaded and until then the width and height are not available.