Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-06-2012, 09:46 PM   PM User | #1
mr_tea
New to the CF scene

 
Join Date: Jul 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
mr_tea is an unknown quantity at this point
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>
mr_tea is offline   Reply With Quote
Old 01-22-2013, 03:54 PM   PM User | #2
jerry62704
Senior Coder

 
jerry62704's Avatar
 
Join Date: Oct 2007
Location: Springfield, IL
Posts: 1,049
Thanks: 9
Thanked 82 Times in 82 Posts
jerry62704 is on a distinguished road
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
jerry62704 is offline   Reply With Quote
Reply

Bookmarks

Tags
coding, flex, tabbed, tabs, youtube

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:48 AM.


Advertisement
Log in to turn off these ads.