Skip navigation
GuyWithDogs_WA
Currently Being Moderated

Bizarre XML access behavior in .NET WebBrowser between Action Script 2 and Action Script 3

Sep 29, 2011 4:15 PM

Tags: #as3 #as2 #action_script_3 #.net #webbrowser #acton_script_2 #"internet #explorer"

I'd started a discussion about a problem with a SWF file not loading an XML data file when rendered in a .NET WebBrowser control in a different forum (http://forums.adobe.com/thread/906011)

 

Further investigation has revealed that if the XML data file is loaded using Action Script 2 (via XML.load()), it works. But if the SWF file in question uses Action Script 3 (via URLLoader.load(), I think), the data file is NOT loaded, UNLESS the XML file is in the same folder as the HTML file.

 

If either SWF file is loaded using Internet Explorer 9, then everything works OK.

 

Are there any know issues (which would be apparently well-hidden from Internet search engines, because we've been beating on those) regarding the performance of SWF + Action Script 3 + .NET WebBrowser?

 

It's just so weird that there are ways to coerce the AS3 solution to work by moving files (not really an option for what we want to do), and that Internet Explorer 9 has no trouble, but the WebBrowser control (which everyone SAYS "is just a wrapper for IE") does NOT work the same way.

Any help appreciated.

 
Replies
  • Currently Being Moderated
    Sep 30, 2011 3:00 PM   in reply to GuyWithDogs_WA

    Show code that loads XML.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 30, 2011 4:10 PM   in reply to GuyWithDogs_WA

    Well, since this is a relative path - flash will attempt to load xml relative to the folder where html page is. Try to use absolute path based on swf original location.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 30, 2011 5:13 PM   in reply to GuyWithDogs_WA

    1. If html page that uses this embed code is in, say, directory

     

    c:\bin\

     

    swf will request xml from the same directory because once Flash is embedded - browser takes over and sends requests relative to the page that is displays.

     

    c:\bin\text.xml

     

    2. "Hard-coding a path to a file would make reuse of any routine impractical"

     

    Yes, it is true but no one proposes doing it. What I suggested was to use dynamic absolute path and to calculate/compose it based on the original swf location that you can read from LoaderInfo.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 30, 2011 6:39 PM   in reply to GuyWithDogs_WA

    Well, if there is a certain dynamism in xml location - there are always FlashVars to direct the right way.

     

    I am not so sure about base parameter. I will check it later but if memory serves me correctly, it is a legacy entity and it is buggy. I will check it out later.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points