As2 loading swf instance

Posted by user1748474 on Stack Overflow See other posts from Stack Overflow or by user1748474
Published on 2012-10-15T22:48:59Z Indexed on 2012/10/15 23:01 UTC
Read the original article Hit count: 105

Filed under:
|
|
|

I have a .swf which loads an external .swf:

this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
var my_listener:Object = new Object();

my_listener.onLoadComplete = function(target_mc:MovieClip) {
target_mc._x = 50;
target_mc._y = 50;
addChild(my_loader);

        var blocker = my_loader.content.test
        blocker._visible = false;
}

my_listener.onLoadProgress = function(target_mc:MovieClip) {
trace(target_mc.getBytesLoaded() + " out of " + target_mc.getBytesTotal());
}

var my_loader:MovieClipLoader = new MovieClipLoader();
my_loader.addListener(my_listener);
my_loader.loadClip("child_as2.swf", container_mc);

I want to acces the external swf and make the movieclip with instance name test visible = false; but it won't work.

I have tried a lot of codes and right now it throws me this error:

Scene=Escena 1, layer=Capa 1, frame=1, Line 9 There is no property with the name 'content'.

Any idea?

If you have a better code i will thank you so much.

© Stack Overflow or respective owner

Related posts about flash

Related posts about actionscript-2