[Xerte] xerte: getting page names

KnowledgeWare knowledgeware at kccsoft.com
Thu Sep 15 04:58:44 BST 2011


Hello All:

 

First of all please understand I'm an AS beginner and in over my head, so I
don't want to waste anyone's time, especially yours Julian. I will figure
this out in time and be a better person for it but if anyone has helpful
comments on my questions below they are appreciated.

 

I've setup an array to be able to add/track variables throughout a piece
(started when I wanted to put the results of a quiz on a page after the
quiz, but since the quiz icon/variables have been destroyed when we go to
the next page I need to store them somewhere - thus the array).

 

The array currently tracks by page number (trackingData[4],etc) .I was going
to try to do it by page 'name' theorizing that that might be easier to
handle in the future ( I might be wrong on this). Where I'm lost is on how
to get page 'names'. I was going to try to loop through the main pages of
the piece and stuff the names of all the pages (instead of numbers) into the
array.

 

I pulled these code samples below out of the wiki and tried them all in
desktop xerte. Only the bottom two get something, and I don't understand
what the bottom one is getting (_level0.engine.IFC.PG_MC24 ).

 

//pageIcon = myIcon.XMLElement.attributes.name;    //Doesnt work

//pageIcon = Icon.parentNode.XMLElement.attributes.name;   //Doesnt work

//pageIcon = rootIcon.currentPage.XMLElement.attributes.name;  //Doesnt work

//pageIcon = rootIcon.XMLElement[currentPage].name;  //Doesnt work

//pageIcon = rootIcon.XMLElement.currentPage.name;  //Doesnt work

 

//pageIcon = _level0.contentXML.firstChild.attributes.name;  //Works gets
Learning Object name

pageIcon = icon.parentNode.clip(); //the page   //Works gets:
_level0.engine.IFC.PG_MC24

debug(pageIcon);

 

This line below would likely do the job if I could figure out how to swap
'firstChild' to an identifier for the page icons I'm looping through:

 

pageIcon = _level0.contentXML.firstChild.attributes.name

 

I'm wondering if anyone knows of a good tutorial or helpfile that explains
this page naming/hierarchy/child/uncle/auntie stuff - I sense it is the key
to a lot of things but I find it highly confusing at this point.

 

Thanks

RonM2

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110914/79894357/attachment.html>


More information about the Xerte mailing list