Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: XML/Flash5.0 |
From: | neo binedell |
Date: | Mon, 8 Jan 2001 09:31:52 GMT |
hiya steve, got your message, will have an example for you soon,
remember that XML.load() is an ASYNC process, it starts the load then
returns. you have to give the XML object a callback function so it can
tell you when it's done.
stop();
var x = new XML();
x.onLoad = OnXLoad;
function OnXLoad( Success )
{
if( Success )
{
var n = this.firstChild;
etc...
}
}
and remember because OnLoad (OnXLoad) is being called from withing
the context of the XML object, you have to specify the full path to any
clips, vars, etc, to use them. I usually give the XML object a Parent ref
to make things easier.
eg.
var x = new XML();
x.Parent = this;
....
in the callback:
var p = X.Parent;
p.gotoAndPlay( "success" );
I'll send you an example for the winamp stuff as soon as I can steal some
time...
layder
neo binedell
NOTE: matt coyne suggested I put that simple example up for download,
apparently some people find
it useful *g*
http://mzone.mweb.co.za/residents/neoji/flashxmlaspexample.zip
-----Original Message-----
From: ownerchinwag [dot] com [ownerchinwag [dot] com]On">mailto:ownerchinwag [dot] com]On Behalf Of
stevefuse-media [dot] com
Sent: January 5, 2001 9:28 PM
To: flasherchinwag [dot] com
Subject: FLASH: XML/Flash5.0
Arrrggghh. <shakesFistAtSky>DAMN TECHNOLOGY!</shakeFistAtSky>
ok
All I am trying to is take the xml output from wimamp, suck it into
flash and display it in a text field. I have this (I know has to be
wrong) in flash:
varTemp = new XML();
varTemp.load("admin.xml");
if (varTemp.loaded) {
varTemp.firstChild;
varTruth = 0;
while (varTruth == 0) {
server = server + varTemp.attributes.SHOUTCASTSERVER;
currentlisteners = currentlisteners +
varTemp.attributes.currentlisteners;
trace(server)
if (varTemp.nextSibling == null) {
varTruth = 1;
}
}
} else {
varTemp = "failed!";
}
message = varTemp;
stop();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: XML/Flash5.0, steve
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]