I am trying to optimize my movie and I’m stuck with the following issue.
The movie has many options, each of them has initially set 3 listeners:
- MOUSE_OVER
- MOUSE_OUT
- CLICK
The question is: In performance terms, is better to set the 3 listeners initially or add and remove MOUSE_OVER and MOUSE_OUT inside of them? I mean:
mouseOverHandler:
- remove mouse over
- add mouse out
mouse out:
- remove mouse out
- add mouse over
Don’t worry as3 is 10 times faster than as 2.0.No significant change in performance.
So If I want to optimize where can I make significant changes?
I have a big flv and it slows down depending on the computer and browser. Also I’m using TweenLite for some animations.
Any suggestion?
It would be redundant to remove the over on over and add it back in again on out. That’s just a lot of calls to addEventListener that don’t need to happen and additionally over complicates code.