3 Replies Latest reply on Nov 3, 2006 10:22 PM by kglad

    Action script

      When loading a SWF into a loader component in a seperate file the attachMovie script of the code does not work.
      For example I created a FLA with two movie clips and a hit test which in turn attaches a movie clip to the stage from the library and this works fine when I test it as a movie(SWF), but when I try loading the SWF into another file it does not work.
        • 1. Re: Action script
          kglad Adobe Community Professional & MVP
          target movieclip methods are lost after initiating a loadMovie() or loadClip().
          • 2. Re: Action script
            mymar Level 1
            Thanks for the response Kglad.
            That's too bad because I created a clever arcade game that i wanted to post to my website.

            What I have noticed in most basic arcade games is when a bullet hits a moving target it sends the target back to it's beginning to follow a new trajectory (Random) but howdo they get on stage in the first place?
            How do they get arcade games to work with out attaching movies. I mean how do you get something on stage from the library???
            • 3. Re: Action script
              kglad Adobe Community Professional & MVP
              i think i misunderstood your question and while my answer is correct, it doesn't apply to your situation.

              if the code you posted works when run in its own swf and fails when that swf is loaded into another swf, the problem is probably due to the _root reference (which refers to the main timeline in the external swf when it's run alone and refers to the main timeline in the loading swf when its loaded.)

              to remedy, use