OOP Platformer Tutorial

Share Collapse

Author Comments

If you're not too familiar with object-oriented coding, try viewing my other tutorial submission first (Object Oriented AS).

This Flash tutorial is meant to introduce the moderately experienced Flash user to a world of platform game design using movie-clip fundamentals fused with ActionScript coding in an object-oriented space.

My second tutorial. Please let me know what you think. If you think it moves too fast, leaves some things out that could otherwise have been covered in more detail, anything you like, etc.

Log in / sign up to vote & review!

Newgrounds accounts are free and registered users see fewer ads!


i was able to make the guy moonwalk


Hey, great tut. the first part of AS wouldnt let my player mover?? hmm weird

please reply with help!

...I think I broke it...

...Sorry -_-;

...But it was very well done, good job

Linkage problem

Hi this Tutorial is the best I've seen around, and i have looked quite for some time for a tutorial that explains what you are actually doing. I had no problems with the script up to the addFloor() script. I'm trying to attach the exported linkage of a movieclip to easyAddFloor(tClip, eName <-- this should be changed to "linkage name" as I understood, x, y).
I have the platform x and y values since the player doesn't fall but the movieclip isn't attached (there is nothing on the screen). Have you any Idea what I might be doing wrong?

thanks a lot again

smokinjoeevil responds:

Using "eName" I was basically referring to it as the "export name" which is synonym to "linkage identifier". To debug your current situation, I'd probably first try just making a straight "attachMovie" call, using the linkage identifier you gave the clip and see is the clip appears. Remember that doing no other coding, the attached clip will appear at the origin (point 0,0) of whatever clip you attach it to. If it doesn't attach, check to make sure you're using the proper case on all characters when passing the name as an argument to the "easyAddFloor" function. If it DOES attach, then I would put a couple of "trace" commands into the "easyAddFloor" function to see where it falls down. For instance, try tracing out the "_name" property of the newly attached clip and see if anything traces. If it traces out "undefined" then the clip isn't being attached at all, and I would first check whether or not the "export in first frame" option is checked in the object's properties (access by right-clicking the clip in the library panel). If it IS checked, that's not the problem, but if it isn't, then you would need to have the clip represented somewhere in a timeline of your project for it to even exist in the compiled movie. If the name of the clip does trace out, then that clip you attached MUST exist somewhere. I'd check to make sure that the clip I am calling actually contains what I think it does, and that there aren't any extra keyframes that are blank, or code on a layer mucking with alphas or something within the clip that would be making it appear empty.

Otherwise, I am not entirely sure. If you like, PM me and I'll send you my e-mail. If you don't mind my seeing your source file I'd be happy to help you work the kinks out of it.

dill cool

This tut is actually more helpful than most flash class teachers I've known. I hope you're still working on that as3 version though. I know it's possible to use it with a few modifications but at times it's like I have to learn two different languages.

Keep it up.

Credits & Info

4.12 / 5.00

Aug 20, 2007
3:37 PM EDT
  • Daily 5th Place August 21, 2007