# updateAfterEvent();issue

**URL:** <https://forum.kirupa.com/t/updateafterevent-issue/174099>\
**Category:** flash\
**Created:** [January 2, 2006, 9:30pm UTC](https://forum.kirupa.com/t/updateafterevent-issue/174099 "2006-01-02T21:30:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doob31](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@doob31](https://forum.kirupa.com/u/doob31)\
**Post date:** [January 2, 2006, 9:30pm UTC](https://forum.kirupa.com/t/updateafterevent-issue/174099/1 "2006-01-02T21:30:59Z")

</div>

I am not new to flash but I am new to OOP in flash and AS 2.0 currently I am testing out building a game but am having some serious issues. It seems that updateAfterEvent fails to work and seems like i have performance issues and haven’t even laid down much code. here is the code for my the updateAfterEvent(); issue… you can view my test page here.  
[http://www.gladnick.com/gametest/](http://www.gladnick.com/gametest/)

## You can clearly see that updateAfterEvent(); Doesn’t work. I have also tried using this code to call the update but when it didn’t work I just put it back the way it should be. -----------------------------Tried this with no luck---------------------- var i = setInterval(function() { updateAfterEvent(); clearInterval(i); }, 1); }

this is inside the Bar Class{  
public function onMouseMove() {  
if (\_xmouse\>left && \_xmouse\<right) {  
mybar.\_x = \_xmouse;  
} else if (\_xmouse\<left) {  
mybar.\_x = left;  
} else if (\_xmouse\>right) {  
mybar.\_x = right;  
}  
updateAfterEvent();  
}  
}

this is inside the Ball Class{

```
public function moveball(current):Void {
    current.mynum = Math.floor(current.myball._x += 10);
    Math.floor(current.myball._rotation += 10);
    trace(current.mynum);
    updateAfterEvent();
    if (current.myball._x&gt;700) {
        current.myball._x = 0;
    }
    updateAfterEvent();
}
public function getmynum() {
    return mynum;
}
public function setInt() {
    trace("Intwascalled");
    trace(this);
    moveInterval = setInterval(moveball, 1, this);
    //moveball();
}

```

}
