Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Tabbed Youtube Widget

    where I work they use Flex, and I'm a newbie programmer! I work on another side of the business, but occasionally I need to do some light flex stuff. If anyone could help me out that would be great!

    I am trying to make a simple widget that has 3 or 4 tabs and each tab displays a different youtube video. here is what i have so far...

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    				layout="absolute" 
    				verticalAlign="top"
    				horizontalAlign="center"
    				creationComplete="Init();" 
    				backgroundGradientAlphas="[1.0, 1.0]" 
    				backgroundGradientColors="[#666666, #FFFFFF]" 
    				viewSourceURL="srcview/index.html">
    	
    	<mx:Script>
    		<![CDATA[
    			private function Init():void
    			{
    				var url:String = "http://youtube.googleapis.com/v/IMCdnPzYdTs";  		//url extracted from embed code
    				Security.allowDomain(url);                                             //allow domain
    				youtubevid.load(url);												  //load video
    				
    			}
    		]]>
    	</mx:Script>
    	
    	<mx:TabNavigator borderStyle="solid">
    						
    		<mx:VBox label="Video 1" width="100%" height="100%" horizontalAlign="center" verticalAlign="top" verticalGap="0">
    				<mx:SWFLoader id="youtubevid" width="480" height="385"/>
    		</mx:VBox>
    		
    		<mx:VBox label="Video 2" width="100%" height="100%" horizontalAlign="center" verticalAlign="top" verticalGap="0">
    			<mx:SWFLoader id="youtubevid2" width="480" height="385"/>
    		</mx:VBox>
    		
    		<mx:VBox label="Video 3" width="100%" height="100%" horizontalAlign="center" verticalAlign="top" verticalGap="0">
    			<mx:SWFLoader id="youtubevid4" width="480" height="385"/>
    		</mx:VBox>		
    		
    	</mx:TabNavigator>
    	
    </mx:Application>

  • #2
    Senior Coder jerry62704's Avatar
    Join Date
    Oct 2007
    Location
    Springfield, IL
    Posts
    1,100
    Thanks
    13
    Thanked 87 Times in 87 Posts
    Ever get it to work?
    .
    .
    ...and gladly would he learn and gladly teach

    Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •