ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Flash file linking to .xml file problems

April 15, 2009 9:49am

Subscribe [3]
  • #1 / Apr 15, 2009 9:49am

    adoseof

    67 posts

    Hey all,

    I have a page that has a piece of Flash that links to an .xml doc to pull in images and link attributes. It works fine when uploaded to another site which you can see here.

    However when I replicate this on my EE site it can’t seem to find the .xml doc. You can see it here.

    In the actionscript where you specify the location of the .xml file (data.xml) I’ve tried absolute and relative links and both work when the .swf is offline or loaded onto the external site but as soon as I upload it to the EE site it seems as thought the browser just can’t find the doc. I notice in the bottom LH corner of the browser window there is usually a message saying “Transferring data from not sure if that is of nay relevance.

    Hopefully this will be something obvious and stupid that I’ve done that someone can help me with.

    Cheers,

    Mark

  • #2 / Apr 15, 2009 10:01am

    Mark Bowen

    12637 posts

    Hi Mark,

    Visiting your first link shows me a piece of Flash with an arrow on it which is what I guess you are referring to. For me though nothing shows up in the player so not too sure if others can see it or not but testing here I couldn’t actually see anything there at all.

    Checking out what it is trying to load into that page though it is looking for this file :

    http://www.adoseof.co.uk/demo/billy/data.xml

    but that doesn’t seem to exist. Is there definitely a file at that location?

    Best wishes,

    Mark

  • #3 / Apr 15, 2009 10:09am

    adoseof

    67 posts

    It seems to be working now. I must have moved the data.xml while fiddling about with the site.

    Apologies

  • #4 / Apr 15, 2009 10:36am

    Mark Bowen

    12637 posts

    Apologies not needed at all. Glad it’s all working for you now although I still don’t see any images on either of those pages so not sure if it is my cache or something on that end.

    Anyway glad you have it all working now though.

    Best wishes,

    Mark

  • #5 / Apr 15, 2009 10:52am

    adoseof

    67 posts

    I don’t have it working. When I replied I thought you meant the test page was now working. I am still no closer to sorting the main page. Interesting that you can’t see the images on the test page.

    Despite me declaring the path to the document as just data.xml (thus in the same directory as the .swf I assume) it will only work if the .xml file is in the directory above.

    Can you tell me what software you are using to identify where the .swf looking for the .xml?

    Mark

  • #6 / Apr 15, 2009 11:10am

    Mark Bowen

    12637 posts

    Okay I can now see the images on the test page, not sure why I couldn’t before, may have been an ISP caching issue or something but I’m still not getting them on the page that you need them to be on.

    This will probably undoubtedly be down to a path issue. You either need to hard-code the full link to the xml file such as :

    http://www.example.com/my-file.xml

    or use an absolute path like this :

    /my-file.xml

    Where exactly is the path to the XML file coded anyway? Is it directly in the .swf file? I’m guessing so as I didn’t see it in the source of your page but came across it using the Activity Window in Safari to see what was being loaded into the page.

    Anyway I would suggest hard-coding the full URL into your .swf file and seeing if that does it, it should do hopefully.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #7 / Apr 15, 2009 11:58am

    adoseof

    67 posts

    I have placed the file in 2 locations just in case it’s looking in the wrong directory. The file is located here: http://www.billyocean.co.uk/data.xml and here http://www.billyocean.co.uk/Flash/data.xml the latter being the location of the .swf file.

    I’ve tried hard coding the full URL of the .xml file into the flash doc and that doesn’t seem to help when the .swf is loaded into the EE site. If I hard code it into the .swf and load it onto the other adoseof site it works fine.

    It’s as though there is something within the EE framework preventing the .swf from seeing the .xml doc.

  • #8 / Apr 15, 2009 12:17pm

    Mark Bowen

    12637 posts

    Are you hard-coding the billyocean xml file or the adosef file location into the one that’s not working?

    If you are coding a different domain into a Flash file and then trying to load a file from a different domain into the Flash file you will need to have a crossdomain.xml file which basically says that it is okay for people to load the information from other domains.

    Could that be it possibly?

    Best wishes,

    Mark

  • #9 / Apr 15, 2009 12:35pm

    adoseof

    67 posts

    Have tried linking to the local file and the file on the other server but neither work.

    At the moment it’s set as

    xml.load("http://www.billyocean.co.uk/data.xml");

    Interestingly, if you try and view the either of the xml files directly by going to http://billyocean.co.uk/data.xml and http://billyocean.co.uk/Flash/data.xml the former just redirects to the home page and the latter come up with some sort of error.

    I wonder if this error page is trying to tell me something?

  • #10 / Apr 15, 2009 3:22pm

    adoseof

    67 posts

    Mark, can you tell me what software you used to identify where the .swf is looking for the .xml document?

    It all looks OK but for some reason it still can’t see the .xml doc (or at least the info within it).

    I’m getting to the stage where I think I might either bin the flash idea or move away from EE.

  • #11 / Apr 15, 2009 3:36pm

    adoseof

    67 posts

    All sorted.

    The path needed to be:

    xml.load("http://billyocean.co.uk/data.xml");

    and not:

    xml.load("http://www.billyocean.co.uk/data.xml");

    Not sure why.

    I’d still be interested to know how you found out where the .swf was looking if you have chance.

    Cheers again,

    Mark

  • #12 / Apr 15, 2009 3:49pm

    Mark Bowen

    12637 posts

    Hi Mark,

    Sorry only just noticed the new posts to this. Glad you have it all sorted now though. It is usually path issues with these sort of things so I’m glad you got it all sorted.

    I mentioned how I saw the path of the xml file back in this post 😉

    Anyway glad that you’re all set now.

    Hope it all goes well for you.

    Best wishes,

    Mark

  • #13 / Apr 15, 2009 3:59pm

    adoseof

    67 posts

    Hi Mark,

    Sorry only just noticed the new posts to this. Glad you have it all sorted now though. It is usually path issues with these sort of things so I’m glad you got it all sorted.

    I mentioned how I saw the path of the xml file back in this post 😉

    Anyway glad that you’re all set now.

    Hope it all goes well for you.

    Best wishes,

    Mark

    No probs, I was wondering HOW you knew where the .swf was looking for the .xml. I am only using FireBug to debug and so fat as I’m aware it doesn’t interact with Flash.

    Don’t supposed you know why it didn’t like the www in the URL do you? I notice that some of the pages on the site will work with relative URLs, some will work with absolute URLs including the www and some will only work when the wwws are removed. Any ideas?

  • #14 / Apr 15, 2009 4:05pm

    Mark Bowen

    12637 posts

    Are you running any .htaccess file on that server? If so it may be that which is causing it.

    Best wishes,

    Mark

  • #15 / Apr 15, 2009 4:07pm

    adoseof

    67 posts

    Yes I am.

    Ah well, guess it’s another mystery. It’s all very well implementing these clever little pieces of kit but I do which I understood what they were doing.

    Cheers for your help Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases