00:00
00:00
Newgrounds Background Image Theme

m00nray just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Oop + Onenterframe

286 Views | 0 Replies
New Topic Respond to this Topic

Oop + Onenterframe 2006-07-27 19:10:55


Say I have a class called Controller()....

If in that class somewhere, I had a method that only occured once, called "select"

I created an object on the _root timeline from the controller class, and during an event I call the select method.

Now, at the end of that menthod, I wanted to invoke a timer. I would need the timer to invoke every frame, how would I toss and onEnterFrame into that method?

I've tried silly things like....

timer function(){
onEnterFrame = function(){
//stuff
}
}

timer function(onEnterFrame){
//stuff
}

and a host of others. How is this accomplished within a class?


Writer @ www.Johnrickett.com