Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Again This Xml



hi geeks, how's going ... i've searched the forum for solution but it's appear no one has this kind of problem If i'm wrong please show me the thread otherwise PLEASE help methis is my problem:My XML is loading fine while it is on my computer, but won't load when i upload it on the server ... i isolate the code for loading the xml and add some functions to watch the loading process, but i still can't resolve the problem ...here is the code, i don't know whether this is the best way to "watch" the loading but ... i'll be glad if you show me more efficient way. But anyway ... the loading problem, disturb me more.
Code:
var perc:Number;var myXML:XML = new XML();var XML_URL:String = "mydata.xml";var myXMLURL:URLRequest = new URLRequest(XML_URL);var myLoader:URLLoader = new URLLoader(myXMLURL);myLoader.addEventListener(Event.COMPLETE, xmlLoaded);myLoader.addEventListener(Event.CONNECT, xmlConnect);myLoader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);myLoader.addEventListener(Event.ENTER_FRAME, xmlLoading);ta.text = 'connecting...';function xmlLoaded(e:Event):void{ myXML = XML(myLoader.data); myLoader.removeEventListener(Event.ENTER_FRAME, xmlLoading); ta.text = myXML.toString();}function xmlLoading(e:Event):void{ perc = myLoader.bytesLoaded / myLoader.bytesTotal * 100; ta.text = 'connecting...'+perc.toString();}function xmlConnect(e:Event):void{ ta.text = 'connected ... please whait to load';}function errorHandler(e:IOErrorEvent):void{ ta.text = 'IOErrorEvent: '+e;}
this is it .... swf and xml are in the same directory, while they're in my computer everyting works fine, but when i upload them to the server, the data xml won't load.they are on the same directory of the server, on the main folder ... public_html i'll be very grateful if you could help me.EDIT: Oh i forgot to mention, "ta" it's just a dynamic text field that i create with (Text Tool) in flash ... i use it to display the data



KirupaForum > Flash > ActionScript 3.0
Posted on: 12-14-2008, 04:04 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

    Copyright © 2005-08 www.BigResource.com, All rights reserved