Quantcast
Channel: Adobe Community : Popular Discussions - Using Flash Builder
Viewing all articles
Browse latest Browse all 70427

Flash Builder embed video in different stages

$
0
0

Hi, I'm Paulinho Cé from Brasil and i have aproblem toembedyoutubevideosonmysitein different stages FlashBuilder.

I have10 videos and want todisplay themin theevent of each button corresponding toadifferentstage.

This codeworksin themain applicationbutnotin the stagesof the site,becausethe functionsand variablesareglobal andcan not changetheurlof the videotoavideodisplaydifferentlyat 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 thissolutionisof extreme importance to me,I requestthe helpofexperts, whichimmenselygrateful.

 

Thanks for all,

 

Congrat's

 

Paulinho Cé


Viewing all articles
Browse latest Browse all 70427

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>