AS2 to AS3 preprocessor converter - Opinions wanted

Posted on Monday 13 November 2006

I’ve started to work a bit in AS3 and I will have to eventually convert an AS2 to project to AS3, which, considering it has over 100 classes already done, is going to be a major pain. So I thought of making a quick preprocessor converter that would take care of the most obvious and repetitive parts of converting from AS2 to AS3 so I can thereafter concentrate on the subtler points. I want your opinions on what it would need to do to make it actually useful for you guys. Here is my current (tentative) feature list:

  • Detect package and wrap, add necessary tabs
  • Add imports for things like MovieClip, TextField, etc.
  • Change .beginFill to .graphics.beginFill, etc.
  • Change ._x to .x etc.
  • Change createEmptyMovieClip to new MovieClip, addChildAt
  • Change createTextField to new TextField, addChildAt
  • Add Mouse/EnterFrame/etc. listeners for things that extend movieclip when that function is overriden (ie, if there is an onEnterFrame function in the class, add a listener to enterframe in the constructor)
  • Change private to protected
  • Strip Delegates

That’s off the top of my head, anything else?


WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 145)]
SELECT * FROM wp_comments WHERE comment_post_ID = '223' AND comment_approved = '1' ORDER BY comment_date

No comments have been added to this post yet.

Leave a comment




Your e-mail address is never displayed. If you run into issues with SpamKarma blocking you, email me at $patrick->5etdemi(com)


RSS feed for comments on this post | TrackBack URI