No. If you are navigating using a script inside a button, it should
work.
You have the interface with an entry frame;
In page one of the main framework (on the interface) you have a page
In that page you have a framework (with id of 'fw')
In the entry frame of the interface, an interaction with a button with a
script should be able to navigate fw to the page you want.
In your script try debug(fw) and see what you get. Remember gotoPage is
0 based.
?
-----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:51
To: Xerte discussion list
Subject: RE: [Xerte] Newbie AS syntax question
Hi Jules,
Sorry, I do not understand. The goto is in a button. The file is parsed,
runs through the Entry Frame to the first page - which contains the
Framework icon -to the first page of the Framework. Then when I press
the button from the Entry Frame, the gotoPage does not work because the
rest of the pages have not been created yet? Is that correct?
Elly
________________________________
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Julian Tenney
Sent: Fri 19/09/2008 12:38 PM
To: Xerte discussion list
Subject: RE: [Xerte] Newbie AS syntax question
Same reason - the page you want to jump to doesn't exist yet.
-----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:30
To: Xerte discussion list
Subject: RE: [Xerte] Newbie AS syntax question
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.ukhttp://lists.nottingham.ac.uk/mailman/listinfo/xerte
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.ukhttp://lists.nottingham.ac.uk/mailman/listinfo/xerte