Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding in XML 1

Status
Not open for further replies.
Kennethkawamoto,

Any resources you can point me to for accomplishing that?

Thanks,
C.
 
I'll take info for both options if you have any insight.
 
OK, here's how to load Twitter Widget into your Flash movie.
Code:
//Document Class
package movie {
	
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.URLRequest;
    import flash.system.Security;
	
    public class Test extends Sprite {
		
        public function Test():void {
			init();
        }
        
        private function init():void {
        	Security.allowDomain("static.twitter.com");
        	
        	var twitterWidgetURL:String = "[URL unfurl="true"]http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf";[/URL]
        	twitterWidgetURL += "?userID=XXXXXXXX&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml";
        	
        	var ldr:Loader = new Loader();
        	ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
        	ldr.load(new URLRequest(twitterWidgetURL));
        }
        
        private function loadComplete(e:Event):void {
        	addChild(e.target.content);
        }
    }
}

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top