2 Replies Latest reply on Oct 22, 2010 7:06 AM by jojo1971

    question on external image loading


      hello flash folks,


      i have a question,

      i am trying to load an external .swf (actually it is only an image that i published as a swf file, not a complitcated movie) but i get errors. I am trying to load the .swf into a movieclip and the movieclip appears on the stage.

      i have put the code in frame 1 where the image should appear (in the movieclip). The code that i used is below and works fine with a .jpg and when i load it  directly on the stage, that is to say, when i put the code in a frame on the stage. Why does it not 'work' right now?

      I have added 'parent' in 'parent.event.target.content.y = 200;' in the first frame of the movieclip timeline,  to make sure that it will appear on the (main)stage. The error that i get is this one:


      TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at galerie2010_fla::mcBallon1_11/frame1()


      this is the code in frame 1 in mcBallon1:


      var imageRequest1a:URLRequest = new URLRequest("images/SWFoverig/ballon1_702x368.swf");
      var imageLoader1a:Loader = new Loader();


      imageLoader1a.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete1a);


      function onComplete1a(event:Event):void
          parent.event.target.content.y = 200;
          parent.event.target.content.x = 205;


      thanks for any help!