[Xerte] Making conditional itineraries with Xerte

Tenney Julian Julian.Tenney at nottingham.ac.uk
Wed Jun 18 09:00:18 BST 2008


Check the help file for properties and methods of icons. For example,
rootIcon.currentPage gives the page number; rootIcon.pages.length gives
the number of pages. It's in the 'scripting reference' bit. You'll find
some things are named after their counterparts in authorware. Remember
though, that Xerte is not authorware, and I didn't set out to recreate
it - it's just very similar in some respects, and quite different in
others.
 
The scripting is basically javascript / actionscript so any reference on
those will be useful.
 
//run a loop
for (i = 0; i< number; i++){
  debug(i);
}
 
//conditionals
if (something == somethingelse){
  debug("Success");
}
 
There is no support for the function or var keywords. You can create
'script functions' very similar to authorware, but they're not really
true functions, more like an old BASIC subroutine. See the help.
 
You can create objects:
myObject = new Object();
 
and then set properties
myObject.name = "julian";
 
You can create xml
myXML = new XML('<node attrib="value">');
 
and lots of other things you couldn't do in authorware easily.
 
Think of the scripting language as very lightweight - for more hardcore
scripting / programming, you can create components in Flash and load
them up. Any swfs you load should be AS2.0 / FP8
 
Fire away with the questions as they come up,
 
J

________________________________

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul
Beckwith, AC&S Ltd
Sent: 18 June 2008 08:47
To: knowledgeware at kccsoft.com; 'Xerte discussion list'
Subject: RE: [Xerte] Making conditional itineraries with Xerte



Hi Ron, 

 

Here is the ActionScript 2.0 reference: http://flash-reference.icod.de/

 

If you want to view the contents of a variable, you can use
debug(myvariable);  anywhere after the variable has been initialized.
(make sure you only have one instance of Xerte running when you use the
debug function) This is one way of doing it which is very handy when
writing code.

 

Hope this helps, 

 

Paul

 

________________________________

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of
ron at kccsoft.com
Sent: 17 June 2008 19:39
To: 'Xerte discussion list'
Subject: RE: [Xerte] Making conditional itineraries with Xerte

 

If I can jump in here I have a question about paging.

 

Is there a place (which I may have not discovered yet) where I can see
the internal variables Xerte is tracking? For instance the
'CurrentPageNum' var in AW. I'd like my paging to track the
'CurrentPageNum' in Xerte and when 'CurrentPageNum' =
'PageCount@"XerteFrameworkIcon"' to go back to the menu page. Any
example of how to do that?

 

Also - I understand Xerte uses Actionscript 1 (which is great, I have no
desire to learn the latest versions) - any suggestion on the best
reference to AS1 for a relative beginner?

 

Thanks

RonM

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Tenney Julian
Sent: Tuesday, June 17, 2008 3:48 AM
To: Xerte discussion list
Subject: RE: [Xerte] Making conditional itineraries with Xerte

 

Hi,

 

There isn't currently a template for doing such an interaction, so you'd
have to build one. How complex that is really depends on how complex you
want to make the scenario. If it's as simple as presenting a stimulus
and have the user select from a list of options, and then present
feedback in the form of text with perhaps optional images, it would be
quite easy.

 

It would also be easy to sequence a number of these pages together, thus
creating a linear sequence of essentially multiple choice questions.

 

Take a look at the pageTemplate.xtp in the [xerte]/wizards folder. It
has a number of page types, one of which is multiple choice question.
You could adapt that, or perhaps it works just fine. To create a project
from this file, double click the xtp file. Xerte will make the new
project and open it (sometimes it doesn't open - just double click the
rltfile in the folder you created the project in if this happens).

 

Is the scenario you want to support as simple as that? If it gets more
complex (i.e. if a and b but not c then go to page x, else if a not b or
c then goto page y else if not a or b and c then goto page z) then you
hit two problems: the code is more complex, and the template editor gets
more complex too. I'd highly recommend keeping it simple.

 

HTH,

 

J

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20080618/a0988167/attachment.html


More information about the Xerte mailing list