# Problem with onEnterFrame or similar

**URL:** <https://forum.kirupa.com/t/problem-with-onenterframe-or-similar/112396>\
**Category:** Uncategorized\
**Created:** [June 7, 2004, 11:47am UTC](https://forum.kirupa.com/t/problem-with-onenterframe-or-similar/112396 "2004-06-07T11:47:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shack](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shack](https://forum.kirupa.com/u/shack)\
**Post date:** [June 7, 2004, 11:47am UTC](https://forum.kirupa.com/t/problem-with-onenterframe-or-similar/112396/1 "2004-06-07T11:47:41Z")

</div>

Hi people!  
I’ve had some trouble making a preloader for external .jpg files. The problem is in the onEnterFrame, I’ll show you some part:

```php
loadjpg = function(mc,jpg) {
mc.onEnterFrame = function() {
trace("lele");
 }
 } 

```

that is just a part of the hole function, but I think it will be enough. It traces “lele” once, not when mc enters a new frame. I’ve also tried to call it with different ways like: [mc].onEnterFrame, with (mc) { onEnterFrame() . Does anyone know how it should really be?
