2 Replies Latest reply on Jul 6, 2006 7:57 AM by Fabio_Seixas

    onload action to load image to a child MC - help

    Fabio_Seixas
      okay i have a button called BTN1 and inside BTN1 i have a Movieclip called MC1
      i wanto to load an external image to MC1

      im using this code and is not working.
      can any one help ?

      loadMovie("1.jpg", MC1);
        • 1. Re: onload action to load image to a child MC - help
          albee
          You aren't allowed to load movies inside movies embedded in buttons. Buttons are different objects than MovieClips, and therefore have different methods that apply. What you can do is convert BTN1 to a MovieClip, give it an instance name, and then add the following code:

          // let's say that the instance name for the button is BTN1, BTN1 is on the root timeline and 1.jpg is in the same directory as your root SWF; this code would go in a frame on the root timeline:
          loadMovie("1.jpg", BTN1.MC1);

          To easily convert your button to a movieclip, select the button, then select MovieClip from the select box in the upper left corner of the property inspector... Make sure that you give your button an instance name after you convert it...

          Good luck,

          Albee
          • 2. onload action to load image to a child MC - help
            Fabio_Seixas Level 1

            GREAT !!!!!
            That worked fine.

            now there is any code i could apply to my BTN1 movieclip so it behaves like a button ? thank you

            ====
            because im bulding a photo web site. so for each big picture i want its thumbnail to be a button...

            thank you again! fabio