3 Replies Latest reply on Mar 15, 2012 9:12 AM by Ned Murphy

    Expandable banner with video by controls not working

    Barry-Warren

      I'm trying create an expandable banner that when expands plays a video that has play, pause, mute buttons and a seek bar.

       

      I've successfully created the video player and converted it to a symbol and it works when I copy it into other flash files so I know it's the banner that troublesome.

       

      The problem is when I use it in the expanded part of the expandable banner I can't click on any of the buttons. I can see it's working as the video is playing and the seeker bar is moving. It's almost as if there's an invisible button over the top (the hand icon is visible) stopping me from hitting the buttons of the player.

       

      The code for the expanding banner is very simple (see below) and I'd be happy if someone could point me in the right direction.

       

      on (rollOver) {

          gotoAndStop(2);

      }

      on (rollOut) {

          gotoAndStop(1);

      }

       

      Picture 3.png

      Picture 6.png

        • 1. Re: Expandable banner with video by controls not working
          Ned Murphy Adobe Community Professional & MVP

          If that code is attached to whatever holds all the buttons you say don't work, then that is what could be causing the problem.  Assigning the code to it blocks access to the objects within it.

          1 person found this helpful
          • 2. Re: Expandable banner with video by controls not working
            Barry-Warren Level 1

            I guess that was what was causing the problem but have no idea what the correct code woule be?

            • 3. Re: Expandable banner with video by controls not working
              Ned Murphy Adobe Community Professional & MVP

              There would not be any correct code, it is the approach.  If you assign mouseover/out code to a container, it will block mouse interaction with anything inside that container.  So you need to figure out some way of not having the code attached to the outside. 

               

              You could try creating that green area as an inside object that you assign that code to.  That would work just fine for a mouseover, but a mouse out would be your nemesis then because as soon as you rollover the video object you rollout of the green area - so you need someway of negating the roll out reaction if you are still within the banner area.

               

              That leads to considering a different approach, where you constantly monitor the position of the mouse.  When it is within the banner area you expand it, and when it is not, you reduce it.  This could be done using an enterframe or a mousemove approach... here is an outline of the mousemove version...

               

              var mouseListener:Object = new Object();

               

              mouseListener.onMouseMove = function() {

                  if(_xmouse .... &&  _ymouse.... basically, code to check within the banner limits){

                       // expand the banner

                  } else {

                       // shrink the banner 

                  }

              };

               

              Mouse.addListener(mouseListener);

              1 person found this helpful