2 Replies Latest reply on Dec 8, 2011 4:34 AM by TheRossman

    VASTLibrary Bug (OSMF 1.6)

    TheRossman

      Hey all,

       

      Not sure where I would report this, but I recently integrated the VASTLibrary into an OSMF project and discovered a bug - at the end of the VAST ad, an exception is thrown trying to clear the MouseEvent.CLICK listener from the mediaContainer, and the media container remains clickable.

       

      Here's the problem code:

       

      VAST2TrackingProxyElement.as

       

       

      private function onTimeComplete(e:TimeEvent):void

      {

          mediaContainer.buttonMode = false;

          mediaContainer.removeEventListener(MouseEvent.MOUSE_UP,onMediaElementClick);

      }

       

       

      and the fix:

       

      private function onTimeComplete(e:TimeEvent):void

      {

          if (container != null)

          {

              var mediaContainer:MediaContainer = container as MediaContainer;

              if (mediaContainer != null)

              {

                  mediaContainer.buttonMode = false;

                  mediaContainer.removeEventListener(MouseEvent.MOUSE_UP,onMediaElementClick);

              }

          }

      }

       

      Hope that helps someone else with the same issue!

       

      Cheers,

      mark