[Xerte] Loading External Content
Andy Beggan
Andy.Beggan at nottingham.ac.uk
Wed Mar 4 17:37:02 GMT 2009
Hmmm OK let's chat tomorrow. We need to do this ALT-C or not.
Also, can I quote you on the issue with Stephen Hibberd and RMG? Al says there isn't an issue, so need to explain what happened from your perspective.
Andy
________________________________
From: xerte-bounces at lists.nottingham.ac.uk
To: Xerte discussion list
Sent: Wed Mar 04 16:32:22 2009
Subject: RE: [Xerte] Loading External Content
You need to use the FileLocation variable to get the full path to the external path.
myData.load("Overview.txt");
works in the browser, because the XMLEngine.swf is in the same folder; when in authoring mode, the XMLEngine.swf is in the Xerte application folder, so it looks in that folder when you only specify the fiename.
You can use _level0.engine.FileLocation to get the first bit of the path, i.e:
myData.load(_level0.engine.FileLocation + "Overview.txt");
HTH,
J
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Patrick Lockley
Sent: Wednesday, March 04, 2009 4:09 PM
To: Xerte discussion list
Subject: RE: [Xerte] Loading External Content
Hi Steve,
It fails me for me when I press the f5 key – but it works fine if I publish it then look at in a web browser (via index.htm).
Might be a sandbox / security setting on your flash player?
Hope this helps.
Pat
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of steve.frank at lucite.com
Sent: 04 March 2009 15:46
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Loading External Content
I am attempting to load some external content into a Xerte project but I'm having difficulty getting this to work when the content itself gets data from an external file.
The project uses a custom interface and contains a couple of graphics icons together with a number of flex style accordian panes, listitems and tabs. Selecting the appropriate combination should load the required external content into the graphic icons using the loadImage() method. e.g. displayGraphic.loadImage(FileLocation + 'Media/Pane1/Graphics.swf')
The external content is always in the form of an .swf file however there are two distinct types.
One contains a number of scenes that are linked by some actionscript. All the graphics are contained within the .swf and this type of file loads and operates without issue.
The second type contains only a single dynamic text block together with a ScrollPane component. The timeline contains the following ActionScript to load the text from a plaintext file at runtime:
myData = new LoadVars();
myData.onLoad = function(success){
if (success) {
myText_txt.htmlText = this.text;
} else {
myText_txt.htmlText = "<b>Flash has failed to load the text file!<b>";
}
};
myData.load("Overview.txt");
Overview.txt is located in the same directory as the .swf and is in the form "text=Required text etc. etc. etc..."
When I test the .swf, it loads and displays the content of Overview.txt as expected, however when I try to get Xerte to load this file I get the "Flash has failed to load the text file!" message.
Displaying text from an external source file is going to be a major part of this project so I need to get this to work.
Being an Authorware refugee, I'm only just getting started with Flash and Xerte so would appreciate any help!
Steve
__________________________________________________________________________________
Lucite International Group Limited. Registered in England No. 5671799.
Registered Office: Queens Gate, 15-17 Queens Terrace, Southampton SO14 3BP, United Kingdom
Holding Company for the Lucite International Group
IMPORTANT NOTICE::- This email is confidential, may be legally privileged, and is solely for the use of the intended recipient. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence.
If you have received this e-mail by mistake, please notify the sender immediately by e-mail and delete this e-mail from your system. The sender has taken reasonable precautions to ensure no viruses are present in this e-mail however the company cannot accept
responsibility for any loss or damage arising from the use of this e-mail or attachments. Please note that this e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium.
We advise that you understand and consider this lack of security when e-mailing us.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090304/95fce3c4/attachment.html
More information about the Xerte
mailing list