# FMX problems with moving code

**URL:** https://forum.kirupa.com/t/fmx-problems-with-moving-code/101346
**Category:** Uncategorized
**Created:** [February 9, 2004, 12:14am UTC](https://forum.kirupa.com/t/fmx-problems-with-moving-code/101346 "2004-02-09T00:14:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flash4food](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@flash4food](https://forum.kirupa.com/u/flash4food)
#### Post date: [February 9, 2004, 12:14am UTC](https://forum.kirupa.com/t/fmx-problems-with-moving-code/101346/1 "2004-02-09T00:14:03Z")

</div>

suppose i have the following code on a movieclip  
[AS]  
onClipEvent(load){  
var someVariable = 0  
someFunction = function(){  
//do something  
}  
}  
onClipEvent(enterframe){  
someVariable++  
if(!\_parent.something){  
someFunction()  
}  
}  
[/AS]

and i want to put that code INSIDE a frame of the movieclip instead of ON the movieclip, i would have to use this.onLoad = function() {blah blah} and this.onEnterFrame = function() {blah blah} and you would suppose it would work the same, but it doesnt work at all. Am i doin something wrong? i appreciate all comments/advice/etc…
