# Why isnt my .onRollOver working?

**URL:** <https://forum.kirupa.com/t/why-isnt-my-onrollover-working/220357>\
**Category:** Uncategorized\
**Created:** [March 25, 2007, 4:10pm UTC](https://forum.kirupa.com/t/why-isnt-my-onrollover-working/220357 "2007-03-25T16:10:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joehann](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@joehann](https://forum.kirupa.com/u/joehann)\
**Post date:** [March 25, 2007, 4:10pm UTC](https://forum.kirupa.com/t/why-isnt-my-onrollover-working/220357/1 "2007-03-25T16:10:51Z")

</div>

Hello,

Another question for you gurus in Kirupa:

I wan to create a photoalbum using “attachmovie”, “for loop” and “loadMovie”, and with the help of fellow kirupa gurus, the result of my script is below:

////////////////////////////////////////////////////

var previewWidth:Number = 60;  
var previewHeight:Number = 70;  
var space:Number = 10;  
var columns:Number = 5;  
for (var i=0; i\<25; i++) {  
var x:Number = (i%columns)_(previewWidth+space);  
var y:Number = Math.floor(i/columns)_(previewHeight+space)  
this.attachMovie(“thumb”,“thumb”+i,i,{\_x:x, \_y:y});  
//////////// loading pictures into the attachmovie ///////////////////  
this[“thumb”+i].loadMovie(“00”+i + “.jpg”);  
this[“thumb”+i].\_xscale = 10;  
this[“thumb”+i].\_yscale =10;

```
  this["thumb"+i].onRollOver = function(){

```

trace(‘its working!’);  
};

}  
function traceName():Void {  
trace(this.\_name);  
}

/////////////////////////////////////////////////////

The above script is able to show all the thumbnails of my photos. However, the:

[COLOR=red] this[“thumb”+i].onRollOver = function(){  
trace(‘its working!’);  
};[/COLOR]

is not working … tried n tried, no avail.

Please Help!!!

Thanx !!!

- Joehann
