Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-14-2006, 12:23 AM   #1
ironchefmoto
Senior Member
 
Join Date: Nov 2005
Posts: 114
Default XFactorstudio XPath requires full URL to load?

I just did a project that called in a static hand-edited XML file to render some content in a Flash piece. I decided to use XFactorstudio's XPath implementation and try it out. Much to my surprise, the day I was trying to launch the project, I could not load the XML properly from a server, even though it worked fine when tested on a local Flash player client.

Typically, I use flashvars in my OBJECT and EMBED tags to leave me the option of changing the relative path to an XML file in one of my projects. I then just load the flashvar into the project. It keeps it from being hardcoded into the Flash interactive.

This time, I used a relative path (urlencoded) in the flashvar, and nothing happened. The XML wouldn't load. It WAS on a phsyically different server, but the relative path should've worked. Instead, the only way I could load the XML using Xfactostudio's XPath implementation was to use the FULL absolute URL in the flashvar (e.g. http://www.website.com/xmlfile.xml).

Any ideas why this may have happened? Is that something that happens with XFactorstudio's XPath implementation?

Thanks,
IronChefMorimoto

Last edited by ironchefmoto; 03-14-2006 at 12:25 AM.
ironchefmoto is offline   Reply With Quote
Old 03-14-2006, 12:36 AM   #2
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

its got nothing to do with the xpath implementation. futhermore from your post i can see you are using xpathdocument which is the deprecated way of dealing with xml from an xpath perspective. rather use the static functions on the XPath object
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 03-21-2006, 06:51 PM   #3
ironchefmoto
Senior Member
 
Join Date: Nov 2005
Posts: 114
Default

One of my XPath calls in the project I mentioned:

Code:
regionTL = XPath.selectNodes(xmlData, "/tournament/region[1]/round");
I'm not using the xpathdocument, as I'm using the AS2 implementation of XFactorStudio's XPath.

That said, why would I need to reference a absolute hard-coded (vs. relative) URL for the XML that I'm loading? If I use the XPath functions built into the flash data classes (the undocumented functions), I don't have to do that.

IronChefMorimoto
ironchefmoto is offline   Reply With Quote
Old 03-21-2006, 07:07 PM   #4
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

thats not the case at all. xpath is completely seperate from the xml object so relative vs absolute url has nothing to do with it. once you have loaded the xml object you use it. thats all there is to it,.
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 03-22-2006, 07:22 PM   #5
ironchefmoto
Senior Member
 
Join Date: Nov 2005
Posts: 114
Default

Why, then, will the same relative path work for the loading the XML into the XML object when I use either the built-in XML functions for Flash or the undocumented XPath functions via the Data Binding Classes? I don't have to point the XML file to load via an absolute URL.

IronChefMorimoto
ironchefmoto is offline   Reply With Quote
Old 03-22-2006, 07:28 PM   #6
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

ok, counter argument. i have been using xfactorstudios xpath implementation since its as1 form, i used to use it in flash, now i use it in flex. our deployment model means that i can never use a full URI, it always has to be relative and never through all these version have i run into this problem. have you tried running a http sniffer yet?
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 03-29-2006, 11:05 AM   #7
pan69
Fight ya for a pint!
 
pan69's Avatar
 
Join Date: Jan 2005
Location: Sydney / Australia
Posts: 1,706
Default

Quote:
Originally Posted by hangalot
now i use it in flex.
If I may be so blunt to ask, do you also use it in Flex 2? And if not how do you do XPath in Flex 2? I don't think XPath is native to Flex 2, or is it?

www.lukeschreur.com

Last edited by pan69; 01-05-2013 at 01:39 AM.
pan69 is offline   Reply With Quote
Old 03-29-2006, 12:32 PM   #8
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

no i do flex 1.5 (which is basically flash 7)developement as a day job, but we are starting to transition it out towards flex2. flex2 has e4x (i prefer xpath).
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 03-29-2006, 03:23 PM   #9
ironchefmoto
Senior Member
 
Join Date: Nov 2005
Posts: 114
Default

I have not run an HTTP sniffer, no. I need to test my FLA on a different server setup. Right now, I'm having to put XML on a server separate from the SWF. It's an idiotic arrangement here at my office, but they have some reason for it. I'll test it on my personal site and see if that makes a difference -- everything on the same path/server.

IronChefMorimoto
ironchefmoto is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visible movie when load jundat ActionScript 1.0 (and below) 2 06-29-2003 11:37 AM
Script to make index.html load full screen, even on Mac?? SCHIMKE Other Flash General Questions 3 05-09-2003 01:10 AM
Launch a full screen browser window on page load automatically mickx7 ActionScript 1.0 (and below) 1 12-17-2002 12:57 PM
load a movie into a movie but then load an other movie into that loaded movie ? lesaint ActionScript 1.0 (and below) 1 03-23-2002 09:16 PM
on load full window kev ActionScript 1.0 (and below) 4 07-02-2001 04:51 PM


All times are GMT. The time now is 11:22 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.