3 Replies Latest reply on May 24, 2008 4:37 PM by Shelady

    YouTube video displays in flash palyer?

    Shelady
      Hi,
      Is there any way I can insert a youTube video in my code.? In my code I have inserted a picture. I want when I click on this picture, a window opens with the youTube video and takes over the screen <i dont want to go on youTube website just want to pull the video from it and play it in flash palyer> and when I close the window I am back to my initialization page.
      Any idea?
      Thanks

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:HBox id="LowerLeft" width="30%" height="80%" borderStyle="solid" borderColor="#fffffc" borderThickness="2">
      <mx:TextArea height="300" width="288" horizontalScrollPolicy="off" verticalScrollPolicy="off" letterSpacing="1" backgroundAlpha="0" borderThickness="0" fontSize="12" fontFamily="Times New Roman" wordWrap="true" textAlign="left" backgroundColor="#869ca7" color="#ffffff">
      <mx:htmlText>
      <![CDATA[
      <p><img src='1.jpg' width='100' height='150' align='left' hspace='10' vspace='10'>This is cardiovascular medicine.translate the extraordinary progress of Promote heart health. At the nucleus of SCVI is a richl as it iscardiovascular medicine.</p><p>This is cardiovascular medicine.translate the extraordinary progress of science and rich thing.</p><p>Cardiovascular medicineThis is cardiovascular medicine.translate the extraordinary progress. </p>
      ]]>
      </mx:htmlText>
      </mx:TextArea>
      </mx:HBox>

      </mx:Application>

        • 1. Re: YouTube video displays in flash palyer?
          VarioPegged Level 2
          The challenge with this is that if you add the <a> tag within the htmlText to turn the image into a link, you can only navigate to a url (like a blank html page on your site that will hold the YT video). I think the simplest solution would just be to open that url in the new window that expands to full screen and then let users close it again. Your app will still be there when they close the window.

          A second and more complicated solution/theory might be to launch a javascript function when the user clicks the image, then via ExternalInterface have it open a VideoDisplay control in your app that contains the YT video. I've never tried this, so your mileage may vary.

          TS
          • 2. Re: YouTube video displays in flash palyer?
            awempty.com
            You can use the YouTube Chromeless API.
            • 3. Re: YouTube video displays in flash palyer?
              Shelady Level 1
              Thank you so much for replying. Here is a website I am inspired by. Please click on the front picture to see pop up style.
              http://www.mksdesign.com/
              I want when I click on the picture, background get darker <alpha is about 20% and black in color> and the instead of a picture, movie starts in the pop up box. After closing the window, I get back to the previous <main website> window.
              Now for the movie I can upload it either from the local folder or from YouTube.
              Any idea!!!!
              Thanks