I do have a few books on AS3 but i did not find a decent explination on the super() function or when to use it. As far as event listeners go, i saw it on some post here i believe. I was just trying to everything i can to optimise the code and find simple answers and the questions i ask are related to actionscript AND since Away3D is written to use actionscript, the questions are related... :)
Anyways thank you....i will search around and see what i can find.... On May 9, 4:54 pm, Michael Iv <[email protected]> wrote: > Doode, the questions you ask are related to ActionScript language in > general . super() is inheritance related stuff. I suggest you to by a > book by name Object Oriented ActionScript. There you will find all the > answers. > > Sent from my iPhone > > On May 9, 2010, at 10:07 PM, CyberHawk <[email protected]> wrote: > > > > > Just a few questions that is more geared toward optimizing the AS3 and > > Away3D in any way possible: > > > I read somewhere where someone said the general rule of thumb about > > even listeners is when you add an even listener, you should also > > remove it if you are done with it otherwise you could get into the > > issue of memory leaks. > > > So, my question is if you add the following event listeners to the > > stage for example: > > > stage.addEventListener(KeyboardEvent.KEY_DOWN, someFunction()); > > stage.addEventListener(KeyboardEvent.KEY_UP, someFunction()); > > stage.addEventListener(MouseEvent.MOUSE_WHEEL, someFunction()); > > stage.addEventListener(MouseEvent.MOUSE_DOWN, someFunction()); > > stage.addEventListener(MouseEvent.MOUSE_UP, someFunction()); > > > If that rule of thumb is true, than does it mean it is mainly > > applicable when event listeners are added to objects and removing it > > when not used as removing it from the stage means you remove the > > ability to interact with flash?? > > > One other SIDE question, I have seen the function "super()" used in > > several classes, I believe at the top inside the constructor of that > > class, what is it for, where and when would you use it, and how do you > > use it? > > > Thank you very much....- Hide quoted text - > > - Show quoted text -
