• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Flash Builder embed video in different stages

Guest
Feb 07, 2011 Feb 07, 2011

Copy link to clipboard

Copied

Hi, I'm Paulinho Cé from Brasil and i have a problem to embed youtube videos on my site in different stages FlashBuilder.

I have 10 videos and want to display them in the event of each button corresponding to a different stage.

This code works in the main application but not in the stages of the site, because the functions and variables are global and can not change the url of the video to a video display differently at each stage.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

layout="absolute" verticalAlign="top"

creationComplete="Init();" >

<mx:Script>

<![CDATA[

private function Init():void

{

var url:String = "http://www.youtube.com/v/zlfKdbWwruY&hl=en&fs=1"; //url extracted from embed code

Security.allowDomain(url); //allow domain

youtubevid.load(url); //load video

}

]]>

</mx:Script>

<mx:VBox width="100%" height="100%" horizontalAlign="center" verticalAlign="top" verticalGap="0">

<mx:Label text="YouTube Video Embedded Inside Flex" width="100%"  color="#060809" textAlign="center" fontSize="16" fontWeight="bold"/>

<mx:SWFLoader id="youtubevid" verticalAlign="top" horizontalAlign="center"  width="425" height="344"/>

</mx:VBox>

</mx:Application>

<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/kdhuQJRW6kA" frameborder="0" allowfullscreen></iframe>

Because this solution is of extreme importance to me, I requestthe help of experts, which immensely grateful.

Thanks for all,

Congrat's

Paulinho Cé

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 08, 2011 Feb 08, 2011

Copy link to clipboard

Copied

LATEST

This appears to be Flex question. Please try posting this to the Flex forums here http://forums.adobe.com/community/flex/flex_general_discussion for better response.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines