Visible = false; not working for parent file

Hi,

So i have my index.swf file with an mc called “loadingspace” (as instance) who appears on a 10 frame animation.

At the 10th frame i have placed this code:

var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("http://www.mysite.com/preload/preloader.swf"));
addChild(my_loader); 
stop();

This index.swf is loading an external swf with the actual preloader in it. Everything works perfectly fine except for one thing. When the preloader is starting i want the fake “loadingspace” to disappear so i tried putting something like this on the same action frame of the preloader:

stop();
[COLOR=red]MovieClip(parent).[COLOR=red]loadingspace[/COLOR].visible = false;[/COLOR]
addEventListener (Event.ENTER_FRAME, preLoad)
function preLoad(e:Event):void{
 
 var bytestoLoad:Number = loaderInfo.bytesTotal;
 var numberLoaded:Number = loaderInfo.bytesLoaded;
 if (bytestoLoad == numberLoaded){
  removeEventListener(Event.ENTER_FRAME, preLoad)
  gotoAndPlay(2);
 }else {
  preLoader.preLoaderFill.scaleX = numberLoaded/bytestoLoad;
  preLoader.bytesPercent.text = Math.floor(numberLoaded/bytestoLoad*100) + "%";
 }
}

It’s not working, the “loadingspace” is still visible.

Anyone who could help me make “loadingspace” disappear?

I’m new to as3 with some basic from as1/as2 btw.

Thanks