2 Replies Latest reply on Aug 30, 2007 12:44 AM by rainwebs

    How can I display Flash Videos without any Flex application decoration

    rainwebs
      I develop a flv video player with Flex3 and have problems to get rid of the application decoration (frame, border and the like) that is part of a standard Flex application. My video player is 200px x 200px and I only wanna see what the video shows, so that the Flex application allocates 200px x 200px.

      It is not clear to me if this can be reached through special tags resp. attributes or if I have to do something in the CSS area.
        • 1. Re: How can I display Flash Videos without any Flex application decoration
          fcu
          copy and compile this one taken from www.theflexteam.com with a couple of extra things, is that it?:
          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical" backgroundColor="#000000"
          backgroundGradientColors="[#000000, #000000]">
          <mx:Script>
          <![CDATA[

          private function playVideo():void
          {
          videoPod.play();
          }
          private function pauseVideo():void
          {
          videoPod.pause();
          }
          private function stopVideo():void
          {
          videoPod.stop();

          }

          ]]>
          </mx:Script>


          <mx:VideoDisplay id="videoPod" source=" http://www.theflexteam.com/gfx/flvs/gorillaz_high.flv"
          backgroundColor="#000000" backgroundAlpha="0" shadowDistance="0" shadowDirection="center"
          />
          <mx:ControlBar>
          <mx:Button id="stopBtn" label="Stop" click="stopVideo();"/>
          <mx:Button id="playBtn" label="Play" click="playVideo();"/>
          <mx:Button id="pauseBtn" label="Pause" click="pauseVideo();"/>
          </mx:ControlBar>

          </mx:Application>

          /cujino
          • 2. Re: How can I display Flash Videos without any Flex application decoration
            rainwebs Level 1
            Many thanks for your code. It did not what I was thinking about, but it helped me to find the solution. It was not the decoration, but the position of the VideoDisplay that was my problem. I added a width and height to application, changed its layout to absolute and added x and y to the VideoDisplay, both with zero. And voila I got what I want.

            Then I deleted the Color attributes in Application and VideoDisplay and still got the same:

            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" width="200" height="200">
            ...
            <mx:VideoDisplay id="videoPod" source="..." x="0" y="0" />
            ...

            The ControlBar needs some extra x and y attribute values to get a perfect presentation ;-)

            BTW: Your blog is bookmarked ;-)