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 l
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) {
if(
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 = Del
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= tru
What isn't working?
You're trying to trace the xmlData object immediately after calling
load(). This won't work as load() isn't a blocking operation. The
XML won't be available to your code until the onLoad event has been
raised (similar to when you use MovieClipLoader).
If your "loaded" trace
D] 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) {
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 PROTECTED
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
{
trace("par
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();
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 of
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
12 matches
Mail list logo