3 Replies Latest reply: Jan 19, 2014 10:16 PM by jurneys RSS

    FLV player "Access of possibly undefined property" from CS6

    jurneys Community Member

      Hello all,

       

      I get this error after I have updated to CS6 pro.

       


      Access of possibly undefined property PLAYING_STATE_ENTERED through a reference with static type Class.

       

      There are no errors when publishing exact same fla from CS5.

       

      This is for the part of controlling embeded flv player, when this player stops, executing a function I made.

       

      I am putting this player manually into a movie clip, which is exported as script and dynamically placed into the scene.

       

      Anyone could let me know why this happens, and why never happened in CS5?

        • 1. Re: FLV player "Access of possibly undefined property" from CS6
          Ned Murphy CommunityMVP

          If there is code using the event in the file can you show how it is implemented?

          • 2. Re: FLV player "Access of possibly undefined property" from CS6
            jurneys Community Member

            Here's the code,

             

            ------------------------------------------------------------------------------------------ ------------------------------------------------------

             

            import fl.video.*;

            import caurina.transitions.Tweener;

             

             

            ACMPreview_mc.mouseEnabled = false;

             

             

            //ACMPlayer.load("flv/Pecan_HD.f4v");

            ACMPlayer.autoRewind = true;

            ACMPlayer.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, ACMPreviewFadeOut);

            ACMPlayer.addEventListener(VideoEvent.STOPPED_STATE_ENTERED, ACMPreviewFadeIn);

            ACMPlayer.addEventListener(VideoEvent.COMPLETE, ACMPreviewFadeIn);

             

             

            function ACMPreviewFadeOut(event:Event):void

            {

                      Tweener.addTween(ACMPreview_mc, {time:1, transition:"Linier", alpha:0});

            }

             

             

            function ACMPreviewFadeIn(event:Event):void

            {

                      Tweener.addTween(ACMPreview_mc, {time:1, transition:"Linier", alpha:1});

            }

             

             

            ------------------------------------------------------------------------------------------ ------------------------------------------------------

             

             

            This code is put into the movie clip which is exported as script, dynamicaly placed into the scene.

             

            And, flv player 'ACMPlayer' is manually placed inside this movie clip.

             

            This is just for fading in/out prepaired preview image for the player, by using tweener.

            • 3. Re: FLV player "Access of possibly undefined property" from CS6
              jurneys Community Member

              Seems like quite a lot of people got the same problem.

               

              http://stackoverflow.com/questions/14597626/as3-flvplayback-component-completion-handler

               

              In my case, use 'fl.video.VideoEvent' instead of 'VideoEvent' wipes out all errors, but published flash freezes..