I'm trying to attach to the addedToStage event in index.mxml, but according to the breakpoints I have set, the event never fires. I'm really just trying to fire an init function when the viewer loads.
This is the code for my s:Application tag:
I've set a breakpoint and put a trace and alert in onComplete, but it never drops in. Is there another/better way to fire an init function?
This is the code for my s:Application tag:
Code:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:viewer="com.esri.viewer.*"
xmlns:managers="com.esri.viewer.managers.*"
pageTitle="myapp"
backgroundColor="0xDAEAC9"
minHeight="600"
minWidth="800"
addedToStage="onComplete()">