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.
this is the code in frame 1 in mcBallon1:
var imageRequest1a:URLRequest = new URLRequest("images/SWFoverig/ballon1_702x368.swf");
var imageLoader1a:Loader = new Loader();
parent.event.target.content.y = 200;
parent.event.target.content.x = 205;
thanks for any help!
i assume that the error is occuring on the first line of the onComplete1a function as parent does not have an event property.
try referencing the Loader directly eg: imageLoader1a.y = 200;
thanks for your reply, it was helpfull that is to say, replacing the code with your suggestion worked just as well. But the problem was in the end not at all in the code. Something with the organisation with my buttons.