Quantcast
Viewing latest article 2
Browse Latest Browse All 10

Custom Events, the new bread

One of the most difference things with me migrating from AcrionScript 2 to 3 was the loss of levels system. At first I took a page out of my old Java days and started to use Get and Set methods on all my objects pass variables around, and then started to make ValueObjects to store data then pushing them around. It wasn’t the best way but it got the job done, unfortunately things got quite cumbersome quickly.

Things changed again recently when I learned (thanks to Lee Brimalow at gotoAndLearn) the ability to wrap extra data into custom Event Objects, my life turned so much easier. I now store the variables I need directly with the event that the variable interacts with, makes things a lot easier.


Viewing latest article 2
Browse Latest Browse All 10

Trending Articles