If you want to trace out your xmlData then put that trace INSIDE the
onLoad function.
otherwise you will get nothing back !
don't forget, these are asynchronus functions - load and onLoad
HTH
Omar Fouad wrote:
class LoadXML {
function LoadXML() {
var xmlData:XML = new XML();
import mx.utils.Delegate;
class LoadXML
{
var xml:XML;
function LoadXML()
{
xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = Delegate.create(this, parseXML);
xml.load(data.xml);
}
private function parseXML():Void
{
Assuming the loaded trace is not going through... Try tracing success
outside of the conditional. If you aren't getting any traces, make sure the
class is importing correctly. Double check your class path and that your
class defintion corresponds to the appropriate package. If it's just a
matter
Your code should trace your XML, when calling new LoadXML().
Have you checked against another XML, Omar?
Are you sure your xml-file is in the same folder as your swf?
You might also try the onHTTPStatus and onData events the XML class offers.
hth,
Matthias
2007/7/30, Omar Fouad [EMAIL
] On Behalf Of Omar
Fouad
Sent: maandag 30 juli 2007 19:27
To: Flashcoders mailing list
Subject: [Flashcoders] Loading xml in AS 2
class LoadXML {
function LoadXML() {
var xmlData:XML = new XML();
xmlData.ignoreWhite= true;
xmlData.onLoad = function (success
aha yes that is working. Thanks in advance, I just made a baracket mistake
:D
On 7/31/07, Enrique Chávez [EMAIL PROTECTED] wrote:
You have to wait for the onLoad Event
class LoadXML {
function LoadXML() {
var xmlData:XML = new XML();
xmlData.ignoreWhite= true;
Ok, I'll repost mine again. Either you didn't receive my post or you
didn't read my post.
--
On 7/30/2007, Steven Sacks wrote:
import mx.utils.Delegate;
class LoadXML
{
var xml:XML;
function LoadXML()
{
xml = new XML();
xml.ignoreWhite = true;
xml.onLoad =
You have to wait for the onLoad Event
class LoadXML {
function LoadXML() {
var xmlData:XML = new XML();
xmlData.ignoreWhite= true;
xmlData.onLoad = function (success) {
if(success) {
trace(loaded);
trace(xmlData);
}
You trace before the onLoadis actually triggered
Try putting the trace in your in your onLoad
Latcho
Omar Fouad wrote:
class LoadXML {
function LoadXML() {
var xmlData:XML = new XML();
xmlData.ignoreWhite= true;
xmlData.onLoad = function (success) {
Matthias and latcho, thanks a lot.. this worked.. the thing is that i made a
mistake in closing brackets... I solved this issue 3 days ago. The list went
down exactly after i posted this thread three days ago, and of course i
didn't get any reply except today
Thanks in advance by the way... This
class LoadXML {
function LoadXML() {
var xmlData:XML = new XML();
xmlData.ignoreWhite= true;
xmlData.onLoad = function (success) {
if(success) {
trace(loaded);
}
}
xmlData.load(data.xml);
trace(xmlData);
11 matches
Mail list logo