4 Replies Latest reply on Mar 23, 2012 1:42 AM by bernd.kay

    Flash AS3 movie animations (and Events) freeze when embedded in PowerPoint 2007

    Martin C12345 Level 1

      Please help. I am developing a product for schools including flash animations - swf files written in AS3 - for insert/embed into

      PowerPoint slideshows. Hundreds of customers are waiting. It is all working apart from one problem: when inserted/embedded in PowerPoint

      2007 slideshows my animations freeze (sometimes) when you leave and return to a PowerPoint slide containing them. The problem doesn't

      appear to show with PowerPoint 2010, but most of my customers have PP2007, so that doesn't help much. I need help finding a work-round for

      what is obviously a bug in Flash Player and/or PowerPoint.


      By experimenting I have found that when you show a PP2007 slide containing a flash movie, move on to the next slide and then return,

      (sometimes) the time-related Events (ENTER_FRAME, TIMER etc) have stopped being dispatched to AS3 code by Flash Player, freezing

      animations. Other Events such as MOUSE_MOVE, KEY_DOWN etc are dispatched to AS3 in random bursts.


      I have created a small flash program and PowerPoint slideshow to demonstrate the problem and put them on the web at:

      www.eye2eyesoft01.co.uk/FlashInPowerPointProb/ExampleIncludingTestFlash.pptx (the PowerPoint slideshow to try) and
      www.eye2eyesoft01.co.uk/FlashInPowerPointProb/EventShowTest.fla (the source of the Flash Movie in the PowerPoint)


      What I am looking for is a work-round - some AS3 code I can run when a user clicks a button (like the 'Experiment' button in my above

      demo) that re-starts normal Event dispatching after the Movie has reappeared in PowerPoint and jammed. Has anyone solved this problem



      If you're an Adobe engineer reading this, then running my PowerPoint on a test machine with a debugging version of Flash Player on it

      might reveal exactly what's going on - if so, you may be able to give me AS3 code triggering a re-start of the Flash Player Event



      Versions showing the problem: Flash Player (latest on 24/1/12) and PowerPoint 2007 on W7-64bit, but no problem showing on

      flash player and PowerPoint 2010 on another W7-64 bit PC. AS3 compiled with Flash Pro CS5.5. The code showing the problem is

      tiny (see the fla source file) - the problem is obviously interaction between Flash Player and PowerPoint - so using Flash Builder instead

      is highly unlikely to make any difference.

        • 1. Re: Flash AS3 movie animations (and Events) freeze when embedded in PowerPoint 2007
          Martin C12345 Level 1

          I've just tried another experiment, with interesting results. I upgraded the Flash Player version on my PC with PowerPoint 2010 on it to the latest - Wheras before, with FP on it, i couldn't see the problem, now I CAN. Therefore this freezing problem seems to be a NEW bug introduced by FP Adobe engineers - you really need to look at this. Everybody else - whatever the external source of this problem, if you can find a work round that I can put in my code to protect my customers from the problem, I would be forever grateful.

          • 2. Re: Flash AS3 movie animations (and Events) freeze when embedded in PowerPoint 2007
            bernd.kay Level 1

            Hi Martin,


            thanks for putting this problem in such accurate words. me too is plagued by this bug and I am ready to pull out my hair over it. (let alone my client, wanting to pull out my hair too..)


            My flash animations are quite simple, a couple of timelines and a little of gotoAndPlay. Complied in AS2, so the problem is not only connected to AS3.


            I tried to put everything on the main timeline - no success

            I tried to have just a preloader in powerpoint and load the main animation as an external swf - no success

            I tried all the "rewind" flash vba scripts plus the flashback add.in, but - no success


            What struck me when the swf was hanging, that in Powerpoint the flash instance was crossed with stripes.


            see here:





            The best I came up with is a hidden "panic button" which is reseting the powerpoint slide, aka reloads the swf. But, alas, you imagine, this method is as unreliable as the whole bug... sometimes you press the button two times and its unfreezes, sometimes it is still stuck after 20 klicks.



            Here the code:


            Code to refresh current slide during the slide show:


            Sub RefreshSlide()

            Dim lSlideIndex As Long

            lSlideIndex = SlideShowWindows(1).View.CurrentShowPosition

            SlideShowWindows(1).View.GotoSlide lSlideIndex

            End Sub








            But maybe it is possible to reset/restart the flash plugin?


            Maybe this articles helps?


            "Restart the Flash plugin without quitting Safari"




            "How to Force Exit Flash Player without Restarting your PC"


            http://forum.playdom.com/showthread.php?39805-How-to-Force-Exit-Flash-Player-without-Resta rting-your-PC




            The last solution is of course to skip Powerpoint and maybe Flash altogether and move to a more reliable plattform? But till I get my client to do that...


            So, thanks to anybody who can shed some light on this bug, lets squish it :-)

            • 3. Re: Flash AS3 movie animations (and Events) freeze when embedded in PowerPoint 2007
              jdevietti Level 1

              Hi there,


              Bernd notified me about your post and I can confirm the "frozen" movie issue with Powerpoint 2010 on Vista with Flash Player


              In terms of workarounds, I wonder if you could use this code (http://skp.mvps.org/ppt00021.htm) to generate events from Powerpoint and then pass those into Flash, bypassing Flash's broken timer mechanism entirely.  The Powerpoint timer code works for me with PPT 2010 on Vista (just watch out for the 2 line breaks in the sample code, which broke things for me when I did a simple copy&paste).  I tried sleeping for only 30ms, instead of 1000ms, and the timer ran faster but still worked.


              So, in principle, you may be able to have a 30ms sleep and then manually call a flash function.  I don't know how exactly to call from VBA into flash but I believe it is possible.


              One other issue to consider is that the sleep call pauses the entire powerpoint program (including any embedded flash player plug-ins) and the timer continues to run even after the slideshow is exited.  You may want to disable the timer once you go the next slide, exit the show, etc.


              Just as a small proof of concept, I added the VBA timer code to the Flash test presentation you put together so you can see them interacting.  The presentation is available at: http://www.cs.washington.edu/homes/devietti/etc/ExampleIncludingTestFlash-VBATimer.pptm.  Just click the green box to start the timer, and the countdown will show up in the orange oval.  You can see that, during the sleep calls, the Flash timer stops running.