1 Reply Latest reply on Feb 16, 2009 11:15 AM by blullama

    Controlling one embedded swf with another

    mikeyjray Level 1
      I have a flash website where I am using the loadMovie() function to load multiple swfs, buttons, etc. into my index.swf file (so it is easier to update one component than the whole movie).

      I have a series of buttons (home, about, services, etc.) that in are in a file called "buttons.swf" and are loading into index.swf. I also have another button called "envelope.swf", which brings up a screen for a "Tell a Friend about this Page" box. I would like to have the "buttons.swf" files disabled when when the "envelope.swf" button is clicked, but I'm not too sure how to go about doing it BECAUSE it is called through loadMovie.

      Can this be done? I know about using enabled=false/true, but how can I use that when referring to an embedded swf?

        • 1. Re: Controlling one embedded swf with another
          blullama Level 1
          That's a very wise method of developing your website.

          My group uses something like this:

          var myComponent:MovieClip = createEmptyMovieClip("myComponent", getNextHighestDepth());
          this.loadClip(src, this.myComponent);

          Then when you need to access a function or value in your component, you just use standard dot notation:


          You can even embed components inside other components.