# Setting the movieclip property .\_visible to false

**URL:** <https://forum.kirupa.com/t/setting-the-movieclip-property--visible-to-false/34377>\
**Category:** Uncategorized\
**Created:** [November 1, 2003, 5:24am UTC](https://forum.kirupa.com/t/setting-the-movieclip-property--visible-to-false/34377 "2003-11-01T05:24:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharvan11](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sharvan11](https://forum.kirupa.com/u/sharvan11)\
**Post date:** [November 1, 2003, 5:24am UTC](https://forum.kirupa.com/t/setting-the-movieclip-property--visible-to-false/34377/1 "2003-11-01T05:24:33Z")

</div>

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 &lt;= (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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 1, 2003, 5:45am UTC](https://forum.kirupa.com/t/setting-the-movieclip-property--visible-to-false/34377/2 "2003-11-01T05:45:53Z")

</div>

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. 🙂

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]. 😛

```auto
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;
	}
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 1, 2003, 6:27am UTC](https://forum.kirupa.com/t/setting-the-movieclip-property--visible-to-false/34377/3 "2003-11-01T06:27:57Z")

</div>

it worked…

Thank you very much!!!

sharvan

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 1, 2003, 6:29am UTC](https://forum.kirupa.com/t/setting-the-movieclip-property--visible-to-false/34377/4 "2003-11-01T06:29:36Z")

</div>

You’re welcome. 😉
