# onPress?

**URL:** https://forum.kirupa.com/t/onpress/123629
**Category:** Uncategorized
**Created:** [September 25, 2004, 1:53pm UTC](https://forum.kirupa.com/t/onpress/123629 "2004-09-25T13:53:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Michael21](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@Michael21](https://forum.kirupa.com/u/Michael21)
#### Post date: [September 25, 2004, 1:53pm UTC](https://forum.kirupa.com/t/onpress/123629/1 "2004-09-25T13:53:04Z")

</div>

hi i’m looking for help ,  
i wont laod some jpg to my project and after load i wont that user could click on them (jpg) and when he do this they make bigger  
i do some thing like this:

\_root.createEmptyMovieClip(“jpg\_mc”,1);  
with(jpg\_mc)  
{  
loadMovie(“picture1.jpg”);  
\_xscale=10;  
\_yscale=10;  
\_x=100;  
\_y=100;

```
  onPress=function()
  {
        trace("working"); //but this doesn't work! Why?
  }

```

}

and ofcourse i have more pictures and i wont to load them dynamicle  
so:

for(i=1;i\<12;i++)  
{  
\_root.createEmptyMovieClip(“jpg\_mc”,1);

```
   _root["jpg_mc"+i].loadMovie("picture"+i+".jpg");
   _root["jpg_mc"+i]._xscale=10;
   _root["jpg_mc"+i]._yscale=10;
   _root["jpg_mc"+i]._x=15+i*5;
   _root["jpg_mc"+i]._y=100;

```

\_root[“jpg\_mc”+i].onPress=function()  
{  
trace(“working”); //but this doesn’t work! Why?  
}  
}
