Long story short use the applicationComplete event.
This is something I struggled with for a while. I don’t use a mouse much and like to code keyboard shortcuts into the applications I build. My code initially looked like this:
Long story short use the applicationComplete event.
This is something I struggled with for a while. I don’t use a mouse much and like to code keyboard shortcuts into the applications I build. My code initially looked like this:
Instead of adding the event listner to the stage object and using the callLater add it to the systemManager object:
systemManager.addEventListener(_____, _______);
and get rid of the callLater.
I hope this works as well!
Dov
Thanks for the advice, I generally find that when I’m using the callLater it’s a workaround for something I’m doing wrong. Could you give the file name/line number you’re referring to though, I’m having trouble finding it.
Line 12 in the first code box above. Where you add the eventListener. add it to the systemManager object instead of the stage object.
This site will give a clearer idea of what the systemManger object is:
http://livedocs.adobe.com/flex/3/langref/mx/managers/SystemManager.html
It basically is like the stage object in Flash. systemManger is what you should use when writing code in Flex. Are you coming from a Flash background?