• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

TROUBLESHOOTING OOP

  • A common error is to forget the “return me” at the end of the on new handler.

  • When you use the new command to create an object, it takes the code as it currently exists. If you change the script member, you have to re-create the object with the new command before the change takes effect.

  • If you use a handler name in a parent script, be sure not to use that same handler name somewhere else.

  • Creating parent scripts might seem natural to OOP programmers, but in many cases a behavior is really what is needed. A good rule of thumb is to use parent scripts only when there is no visual component to the object, or possibly when more than one sprite needs to be controlled by an object.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint