use the moviecliploader class and its onLoadError method.
Hi, thanks for replying!
I don't think that the MovieClipLoader is going to do the trick in this case. I wasn't detailed in my initial post, and perhaps I should have been.
We use a product called ProForm (http://www.rapidintake.com) to create online courses for a client. The structure of ProForm uses a main movie clip (player.swf) to load other assets. In general, these other assets are located in the same or lower-level folders from the one in which player.swf resides. The ProForm IDE creates an sco.xml file which contains information on all of the pages in the course, and the assets to use in each page. When the course is initially loaded, player.swf loads sco.xml and then parses the data and creates a table of contents, and then clicking a TOC link initiates an action to fetch the appropriate assets and display them in the selected template.
This all works fine on a standard web server configuration. However, our client hosts a content network, which is comprised of a number of Cisco routers with hard drives directly attached. I don't understand the particulars of the way data is retrieved from the hard drives, but what I do know is that when one attempts to load a ProForm course that is stored on this content network, the course fails to load, apparently due to being unable to find the sco.xml file and proceed from there.
I'm trying to create a little Flash movie clip that we can use to try to diagnose the effects of loading various files (swfs, xml, whatever) directly from the content network into the movie clip. While I can see that when I attempt to load a remote player.swf file while running the diagnostic clip from the Flash IDE that player.swf cannot load sco.xml because it is attempting to do so from a local context instead of trying to load the copy which resides in the same folder on the remote server as player.swf, I can't figure out how to modify my diagnostic clip so that any of these error messages that are being traced to the Output window in the IDE can be echoed in a text area in the diagnostic clip.
Essentially what I wish to do is to modify the diagnostic clip at a fundamental level such that any errors that occur while it is running - regardless of where or how - will be displayed in a text area I've created in the clip, so that I can track all errors that occur at any point and within any child of the diagnostic clip.
I'm sorry to be so long-winded, but after looking at the implementation of the error handling for the MovieClipLoader, I didn't see how it could be useful when the actual load error is occurring in a clip loaded by that object, once the loading had completed.
Thanks for reading if you've made it this far!
is there an embedding html for player.swf that's opened by a user? is there an embedding html that you open to load your diagnostic swf?
if yes and yes, are both html's in the same directory?
and, are you trying to solve the current problem or trying to create something that can be applied to problems beyond the current one?
I'm primarily focused on resolving the current problem, although if the diagnostic is robust enough I don't see any reason it couldn't be applied to other circumstances.
There is an embedding HTML page for the player.swf file. When that page is referenced, it loads the player.swf file just fine (although the player.swf still fails to load sco.xml, or anything else).
There isn't currently an HTML file for the diagnostic bit, because it's still in development. When it is developed, it won't be in the same directory as the relevant player.swf file, it will instead be on a local pc, and will use the web address to load the player.swf remotely. I expect that the same sandbox violation errors I'm seeing now in development will occur, but I won't have an output window in which to view the errors. Which is why I've got to find a way to capture those errors and display them in a useful fashion.
Thanks again for reading this!
1 person found this helpful
all the paths that player.swf uses are relative to its embedding html's location, not relative to the swf itself.
1. that should help you solve your current problem
2. your diagnostic swf and it's embedding html, if there is one, needs to be in the same directory as the problematic player.swf embedding html.