1 Reply Latest reply on Aug 3, 2012 11:37 PM by AdobeKimber

    allTransitionsInDone Event


      I've created a small proof of concept Flash module that's based around a Flash Form Application.  I choose this kind of application because I'm simulating a multi-page information gathering application, and a Form application appeared to "simplify" my task....


      I've created a number of "input" forms and am at the very end - where I process everything.  With all of my input received, I want to do a whole bunch of processing and build a PDF that will be displayed to the user.


      Originally, I thought about inserting my "calculation" code inside the "reveal" event.  But, I quickly found out that Reveal happens just as my form is gaining focus. The net effect of all of my calculation code executing in Reveal is a nasty "pause" before the screen ever pops up.


      I next tried "focusIn" and "focusOut" - but that code is never being fired!


      Thinking I'd botched my code, I added "hide" - and find that the hide code fires when I transition off of my form (my trace() fires - so I know I'm getting thru that code...)


      I'm currently playing with a little code in the Actions - Frame for the Form.  Since my Form is based upon a Screen, all of the events from Screens are available.  And an interesting event available to me is allTransitionsInDone.  I added code to add an event handler to trap allTransitionsInDone and allTransitionsOutDone and ran my code.


      I've added focusIn, focusOut, hide, allTransitionsInDone and allTransitionsOutDone event listeners to the code.  Running my code, I see ONLY the hide event fire when I transition off of my form.


      My frame1 code looks like:


      addEventListener("focusIn", onfocusin);
      addEventListener("focusOut", onfocusout);
      addEventListener("hide", onhide);
      addEventListener("allTransitionsInDone", transitionsInDone);
      addEventListener("allTransitionsOutDone", transitionsOutDone);

      function transitionsInDone() {
          var d1:Date = new Date();
          trace("allTransitionsInDone completed at " + d1);

      function transitionsOutDone() {
          var d1:Date = new Date();
          trace("allTransitionsOutDone completed at " + d1);

      function onfocusin() {
          var d1:Date = new Date();
          trace("onfocusIn received at " + d1);

      function onfocusout() {
          var d1:Date = new Date();
          trace("onfocusOut received at " + d1);

      function onhide() {
          var d1:Date = new Date();
          trace("onhide received at " + d1);


      I honestly don't see what, if anything, I'm doing wrong....


      Anyone got any ideas???