[Xerte] Xerte3: Loading external data

Peter Huppertz peter.huppertz at baselgovernance.org
Tue Jun 15 14:43:24 BST 2010


So, I wasn't sure how to use the HTTPService. I tried to place a script calling myHTTPIcon.load() beneath the myHTTPIcon, but that gave a reference error. I also looked up the examples, but could not find one for the HTTPService.


On 15.06.2010, at 15:38, Julian Tenney wrote:

> Did the HTTPService not work, or did you just decide it was easier to
> use the templateData
> 
> -----Original Message-----
> From: Tenney Julian 
> Sent: 15 June 2010 14:36
> To: 'Xerte discussion list'
> Subject: RE: [Xerte] Xerte3: Loading external data
> 
> Sure, why not.
> 
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter
> Huppertz
> Sent: 15 June 2010 14:36
> To: Xerte discussion list
> Subject: Re: [Xerte] Xerte3: Loading external data
> 
> I'm using the templateDataSource of the Application icon. This works
> like a charm. I use it to load a XML file which holds all the text of my
> piece, so I'm ready to translate it to different languages by just
> adding a new language to my xml. Would you do it that way?
> 
> Peter
> 
> 
> 
> On 15.06.2010, at 14:29, Julian Tenney wrote:
> 
>> I think you need to call iconID.load()?
>> 
>> -----Original Message-----
>> From: xerte-bounces at lists.nottingham.ac.uk
>> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter
>> Huppertz
>> Sent: 15 June 2010 13:15
>> To: Xerte discussion list
>> Subject: [Xerte] Xerte3: Loading external data
>> 
>> There are a number of Data icons in Xerte3. As far as I can see
>> HTTPService is the only icon which is working at the moment. Can I use
>> this icon to load a XML file which is located in the same directory as
>> my Xerte piece?
>> 
>> I tried the following:
>> HTTPService, url = languages.xml
>> -- EventHandler "result", debug(event.target.data)
>> but nothing comes up.
>> 
>> Alternatively I tried to load it using a script icon:
>> 
>> import flash.net.URLLoader;
>> import flash.net.URLRequest;
>> var loader:URLLoader = new URLLoader();
>> loader.addEventListener(Event.COMPLETE, loadXML);
>> loader.load(new URLRequest("languages.xml"));
>> function loadXML(e:Event):void {
>> xml = new XML(e.target.data);
>> debug(xml);
>> }
>> 
>> This gives me: Parse Error: msg.no.paren.arg [line:5/k04]
>> 
>> Any ideas?
>> 
>> Peter
>> 
>> 
>> ==================================
>> Peter Huppertz
>> E-learning and IT Specialist
>> International Centre for Asset Recovery
>> Basel Institute on Governance
>> Phone: +41 61 205 55 18
>> Fax: +41 61 267 55 19
>> 
>> _______________________________________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>> _______________________________________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> 
> ==================================
> Peter Huppertz
> E-learning and IT Specialist
> International Centre for Asset Recovery
> Basel Institute on Governance
> Phone: +41 61 205 55 18
> Fax: +41 61 267 55 19
> 
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte

==================================
Peter Huppertz
E-learning and IT Specialist
International Centre for Asset Recovery
Basel Institute on Governance
Phone: +41 61 205 55 18
Fax: +41 61 267 55 19



More information about the Xerte mailing list