FMS 서버사이드에서 XML로드하기

Adobe Flash/ActionScript 3.0 2012. 2. 20. 15:40
반응형


http://fmsguru.com/forum/messages.cfm?threadid=A00467C0-E4D4-A259-AB016AE6DA10A683


Hey kortex,

thanks for response. Could you please give an example. I load the streamnames from a xml object and put them in an array.

my code:


var StreamArray = new Array();
var location_xml = new XML();

var xmlfileObj = new File("Location_list.xml");
location_xml.onLoad = function( success ) {

if(location_xml.loaded == true) {
if (location_xml.firstChild.hasChildNodes()) {
for (var aNode = location_xml.firstChild.firstChild; aNode != null; aNode=aNode.nextSibling) {

if (aNode.nodeType == 1) {
StreamArray[aNode.attributes.id] = aNode.attributes.name ;
}
}
}
}
}

location_xml.load(xmlfileObj);

my xml doc:

<?xml version='1.0' encoding='utf-8'?>
<location>

<loc id="0" name="home1" />
<loc id="1" name="home2" />
<loc id="2" name="home3" />
<loc id="3" name="home4" />

</location>

after this sequence i have the four names home1 - home4 in my streamarray. These prerecorded streams stored in a stream folder in the application folder.

Please, could you give an example how you use the file object to rename and move the .flv`s.

Thanks a lot,

Arvit

반응형

'Adobe Flash > ActionScript 3.0' 카테고리의 다른 글

Updated fl.* Package .swc‎ -  (0) 2012.02.21
FMS client.call  (0) 2012.02.20
opensocial-actionscript-client  (0) 2012.02.15
ScaleBitmap : 9-slice bitmap class  (0) 2012.02.15
application.acceptConnection  (0) 2012.02.08
: