4 Replies Latest reply on Jun 26, 2006 7:19 PM by Rothrock

    EmptyContainer issue

    demetriusmcclain Level 1
      This is the code I have to place a swf file at a specific coordinate in a fla file.


      _root.createEmptyMovieClip("container_mc", 1);

      //positioning ... your desired x y coordinates ...

      container_mc._x = 200;
      container_mc._y = 200;

      container_mc.loadMovie("some.swf");


      I want to know how I would place more than one swf file at a specific location with the same fla file? I have tried everything. All help will be greatly appreciated. Thanks in advance.
        • 1. Re: EmptyContainer issue
          kglad Adobe Community Professional & MVP
          change your container_mc's _x and _y coordinates. (is this a trick question?)
          • 2. Re: EmptyContainer issue
            demetriusmcclain Level 1
            No, No, It's not a trick question. So, are you saying all I have to do is just add the same code under the first code and just change the name of the swf file? Like this


            _root.createEmptyMovieClip("container_mc", 1);

            container_mc._x = 200;
            container_mc._y = 200;

            container_mc.loadMovie("some.swf");

            container_mc._x = 500;
            container_mc._y = 30;

            container_mc.loadMovie("someother.swf");



            • 3. Re: EmptyContainer issue
              Rothrock Level 5
              Yup. It is that simple. (I thought it was a trick question too!)

              One thing to remember is that if you want to reposition the container based on the size of swf you are loading you will have to wait until the swf has loaded. Then you can get its _height and _width to reposition it.
              • 4. Re: EmptyContainer issue
                Rothrock Level 5
                Ah, I see the trick. You say "how I would place more than one swf file at a specific location with the same fla file." Remember there is no FLA file once you publish.

                Also do you mean that "some.swf" and "someother.swf" should be on the stage at the same time? If that is the case then you could do this:

                this.createEmptyMovieClip("container1_mc",1);
                this.createEmptyMovieClip("container2_mc",2);
                container1_mc._x=container1_mc._y=200;
                container2_mc._x=500;
                container2_mc._y=30;
                container1.loadMovie("some.swf");
                container2.loadMovie("someother.swf");

                If that is what you meant.