[Xerte] Newbie AS syntax question
Langewis, E.A. (Elly)
E.A.Langewis at uu.nl
Fri Sep 19 11:30:25 BST 2008
Yes! that works.
Why does that not work if the button is put in an Entry Frame at the start of the document (just below the Interface icon)?
________________________________
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Julian Tenney
Sent: Fri 19/09/2008 12:09 PM
To: Xerte discussion list
Subject: RE: [Xerte] Newbie AS syntax question
As the rlo file is parsed, it does things in this order:
- Sets up the interface
- Creates the first page
- Adds its child icons and executes any script
- Adds the next page
So if you have a script in page one that directly nvigates to page 2, it
won't work until page 2 exists. Put the script in a button on page 1 and
you'll see - because then the button is clicked after all the pages have
been created and id.gotoPage(n) will work.
There is an 'onInit' event you can listen to to executute code once the
whole learning object has initialised. It is broadcast by rootIcon.
J
-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Langewis,
E.A. (Elly)
Sent: 19 September 2008 11:07
To: Xerte discussion list
Subject: [Xerte] Newbie AS syntax question
I am new to Xerte AND ActionScript, so this is a very basic question.
I got a few pages in a framework (the framework has an ID assigned to
it). What can I put in a script icon in the first page, to make it go to
the next page? I'm just trying to understand AS. I tried gotoPage, and
used frameworkID.gotoPage(2), but nothing happens. I know the code gets
executed (debug('here')). What is wrong?
TIA
Elly
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
More information about the Xerte
mailing list