Quantcast
Viewing all articles
Browse latest Browse all 108516

callback method vs event listeners

I have developing a game in AS 3 with MVC pattern. In my document class, I have created around 15 event listeners to update the game view.

 

My question is instead of event listeners can I use call back function?.

 

I have tested the sample file by replacing the addeventlisteners with callback function. It is working fine.

I think compare to eventlisteners, call back will took less memory only ().

 

Any suggestion please?

 

thanks in advance


Viewing all articles
Browse latest Browse all 108516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>