# Onclipevent weirdness

**URL:** <https://forum.kirupa.com/t/onclipevent-weirdness/99182>\
**Category:** Uncategorized\
**Created:** [January 15, 2004, 6:08pm UTC](https://forum.kirupa.com/t/onclipevent-weirdness/99182 "2004-01-15T18:08:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kill\_robot\_kill](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kill_robot_kill/32/359_2.png) [@kill\_robot\_kill](https://forum.kirupa.com/u/kill_robot_kill)\
**Post date:** [January 15, 2004, 6:08pm UTC](https://forum.kirupa.com/t/onclipevent-weirdness/99182/1 "2004-01-15T18:08:25Z")

</div>

so I was just messing around in flash, and noticed something rather strange about an onclip event.

[AS]onClipEvent (load) {  
randomNumber = Math.floor(Math.random()\*5);  
\_parent.holder.loadMovie(randomNumber+".jpg");  
trace(randomNumber+".jpg");  
}  
[/AS]

That is the basic code, if I am to target holder or \_parent.holder, or \_root holder. This onclipEvent acts as I would suspect. but if I am to add “this” to the loadmovie line  
this.loadMovie(randomNumber+".jpg");  
I get a repeating trace…  
why is that?  
if I take out the two lines above the trace command it only traces once.

whats going on?
