# Movieclip dimmensions

**URL:** https://forum.kirupa.com/t/movieclip-dimmensions/248603
**Category:** Uncategorized
**Created:** [January 10, 2008, 1:44am UTC](https://forum.kirupa.com/t/movieclip-dimmensions/248603 "2008-01-10T01:44:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![EdwardT](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@EdwardT](https://forum.kirupa.com/u/EdwardT)
#### Post date: [January 10, 2008, 1:44am UTC](https://forum.kirupa.com/t/movieclip-dimmensions/248603/1 "2008-01-10T01:44:33Z")

</div>

I have this code that uploads thumbnails and once they are clicked they get enlarged  
var whichImage = 16;  
var thumb:Array = new Array();  
var largepic:Array = new Array();  
var titles:Array = new Array(“Biron”, “Icon”, “Marin”, “Vincent”, “Ioana”, “LiForms”, “Landscape with figure”, “Maternity1”, “Musician”, “Mother’s Pain”, “Zoomahia”, “Embrace me…”, “Charlie”, “Three Figures”, “Henry Lee”);  
loadmovies();  
function loadmovies() {  
for (i=1; i\<whichImage; i++) {  
thumb\* = attachMovie(“emc”, “imageLoader”+_, i);  
thumb_.\_x = (i-1)_60;  
thumb_.\_y = 490;  
}  
}  
var mclListener:Object = new Object();  
mclListener.onLoadStart = function(target\_mc:MovieClip) {  
target\_mc.\_height = 50;

};  
mclListener.onLoadComplete = function(target\_mc:MovieClip) {  
target\_mc.\_alpha = 50;

};  
mclListener.onLoadInit = function(target\_mc:MovieClip) {  
target\_mc.onRollOver = function() {  
this.\_alpha = 100;  
};  
target\_mc.onRollOut = function() {  
this.\_alpha = 50;  
};  
target\_mc.onRelease = function() {  
for (i=1; i\<whichImage; i++) {  
var x = “imageLoader”+_;  
if (this.\_name == x) {  
loadMovie(“large/picture”+_+".jpg", “bigimage”);  
var count = i-1;  
txt.text = titles[count];  
}  
}  
};  
};  
function init() {  
for (i=1; i\<whichImage; i++) {  
var image\_mc:MovieClipLoader = new MovieClipLoader();  
image\_mc.addListener(mclListener);  
image\_mc.loadClip(“large/picture”+_+".jpg", “imageLoader”+_);  
}  
}  
init();  
onEnterFrame = function () {  
for (i=1; i\<whichImage; i++) {  
var mousex = \_xmouse/(Stage.width/4);  
if (\_ymouse\>=520) {  
thumb\*.\_height = 30;  
thumb\*.\_width = 30;  
if (mousex\<2 and thumb[whichImage-1].\_x\>Stage.width/8) {  
thumb\*.\_x -= .5;  
thumb\*.\_y = 490;  
} else if (mousex\>2 and thumb[whichImage-(whichImage-1)].\_x\<Stage.width/8) {  
thumb\*.\_x += .5;  
thumb\*.\_y = 490;  
}  
}  
}  
};

the problem is i cannot set height and width for the thumbs i upload. the \_height and \_width properties work fine after if (\_ymouse\>=520) but if i try to set the properties before i get a blank page. So my question is, what can I do to set the height and width values, and why is it working after the if statement and not before?  
Thanks
