Hey All,
So right now, I have a video player that pulls in all sorts of info (flv url, caption file url, video title, description, preview image, etc.) through an external xml file (playlist.xml). It works great, but I need to change the coding so it’s not hard-coded into the FLA, rather from the embed code for the swf.
Any idea how I can do this?
Here’s the chunk of AS3 code that’s involved in the original loading of the XML data:
[LEFT]var Loadedxml:XML;
var urlLoader:URLLoader = new URLLoader();
var urlRequest = new URLRequest("playlist.xml");
urlLoader.load(urlRequest);
urlLoader.addEventListener(Event.COMPLETE, onComplete)
function onComplete (evt:Event):void
{
try
{
var Loadedxml:XML= new XML(evt.target.data);
processXML (Loadedxml);
}
catch (evt:TypeError)
{
trace ("Could not parse text into XML");
trace (evt.message);
}
}[/LEFT]
And here’s the code on the html page:
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="415" id="AS3_Player_XML_1119" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="AS3_Player_XML_1119.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ecf2fe" /> <embed src="AS3_Player_XML_1119.swf" quality="high" bgcolor="#ecf2fe" width="500" height="415" name="AS3_Player_XML_1119" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
Thanks!
Joe