
Welcome Guest
|
#1
|
|||
|
|||
|
XML Loading on Server Problems
Hello,
I recently started working with flash9 (never used flash before) but just for the programming. I have a lot of programming and UI experience so basically I get the Flash stages ready with all objects and add the AS3 to make it work and animate. I have a simple logos rotation flash object that loads data from an XML file and imports the needed logo files each time. On my local host, everything works great and the animation sequence and XML loading goes flawlessly. When I attempt to put it on my web server it fails and doesn't even start. Now, I know all the allowSameDomain params and stuff and I tried fiddling around for a while with them (I'm using mootools Swiff to display the flash). If I remove all the XML error handling functions I get an ioError streaming error in FireFox 3.0. Here's my XML loading code: Code:
/* XML
------------------------------------------------------------*/
var myXML:XML;
var xmlReq:URLRequest = new URLRequest("library/home_featured.xml");
var xmlLoader:URLLoader = new URLLoader();
var totalItems:int;
var lastIndex:int;
function completeHandler(event:Event):void
{
trace ("XML completeHandler: " + event);
myXML = new XML(xmlLoader.data);
totalItems = int(myXML.image.length());
lastIndex = totalItems - 1;
// function init(); starts animation sequence and basically everything
init();
}
xmlLoader.load(xmlReq);
function progressHandler(event:ProgressEvent):void { trace ("XML progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal); }
function openHandler(event:Event):void { trace ("XML openHandler: " + event); }
function securityErrorHandler(event:SecurityErrorEvent):void { trace ("XML securityErrorHandler: " + event); }
function httpStatusHandler(event:HTTPStatusEvent):void { trace ("XML httpStatusHandler: " + event); }
function ioErrorHandler(event:IOErrorEvent):void { trace ("XML ioErrorHandler: " + event); }
xmlLoader.addEventListener(Event.COMPLETE, completeHandler);
xmlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
xmlLoader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
xmlLoader.addEventListener(Event.OPEN, openHandler);
xmlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
xmlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);Site sits on: ROOT Flash SWF: ROOT/flash_content/home_featured.swf Flash XML: ROOT/flash_content/library/home_featured.xml Logos: ROOT/flash_content/images/featured/ If anyone has any idea how can I make it work online or some sort of a clue to what can be causing the problem it'll be great. Adam. |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trouble Loading a FLV using XML... | JWraith | Actionscript 2.0 |
0 | 09-11-2008 06:31 PM |
| Problems loading XML | Quade | Newbies |
5 | 11-12-2007 01:44 PM |
| Loading XML content into ScrollPane component | orderofout | Actionscript 2.0 |
2 | 11-12-2007 06:01 AM |
| Loading xml through a proxy server | david_eldrick2 | Client Side | 1 | 03-17-2006 07:48 PM |
| Loading data from xml into dynamic text field. | jcscoles | Newbies |
3 | 05-01-2005 05:47 PM |





