OOP Movement

Hi all, I’m wondering if someone could give me any pointers?

I’m in the process of wrestling with OOP. (And its proving pretty tough going!). What i would like to know is how exactly I can add movement to the objects I’ve added to the stage? I tried to add rollover/rollout events (which I’ve commented out) but it just threw up error messages??

What I’d eventually like to do is incorporate the TweenMax class (which rocks!) into it, maybe move the button or increase the scale, so any help would be fantastic!

You can find what I’ve got so far here

Any help would be great,
Cheers,
Squibn

If you move the following two lines to line 21 (or anywhere after btn1 is created in that function), then your event handlers will work properly:

btn1.addEventListener(MouseEvent.MOUSE_OVER, onFolderOver);
btn1.addEventListener(MouseEvent.MOUSE_OUT, onFolderOut);

Those lines didn’t work before because they were in the class initialization function (which runs before the constructor) and because you were outside of the scope in which btn1 was defined.

Ahhhh! That makes sense. Thanks a million Krilnon,
I can see this OOP stuffs gonna be heavy going!