Setting the movieclip property ._visible to false

Hi,
I used the following code to read a file “images.txt” and build a movieclip by loading the images specified in the file.

I wanted to make this dyanmicaly built movieclip invisibe.
i.e “setProperty (_root.preloader[‘part’+count], _visible, false);”
line in my code below is not working.

Please help
Thanks,
sharvan

[AS]
var count = 0;
var offset = 0;
_root.createEmptyMovieClip(‘preloader’, 10);

function BuildMovie() {

    for ( count =0; count <= (images.length -1); count ++)
    {
            _root.preloader.createEmptyMovieClip('part'+count,count);
            _root.preloader['part'+count].loadmovie(images[count]);
            
            setProperty (_root.preloader['part'+count], _x, 20+offset);
            setProperty (_root.preloader['part'+count], _y, 20);
            setProperty (_root.preloader['part'+count], _visible, false);
            
            offset = offset + 200;
    }

}

//
//
m = new LoadVars();
m.onLoad = function(ok) {
if (ok) {
images = this.Images.split("|");
Trace(images.length);
Buildmovie();
}
};
m.load(‘images.txt’, this);

[/AS]

Set their [font=courier new]_visible[/font] property to [font=courier new]false[/font] once the image has been fully loaded into each movie clip. :slight_smile:

Or you could just create another movie clip, load the images into it a set the parent’s [font=courier new]_visible[/font] property to [font=courier new]false[/font]. :stuck_out_tongue:

function BuildMovie() {
	for (var count = 0; count<images.length; count++) {
		var part = preloader.createEmptyMovieClip("part"+count, count);
		part.createEmptyMovieClip("temp_mc", 0).loadMovie(images[count]);
		part._x = 20+200*count;
		part._y = 20;
		part._visible = false;
	}
}

it worked…

Thank you very much!!!

sharvan

You’re welcome. :wink: