[Xerte] Re: swf inside xerte navigation question

Julian Tenney Julian.Tenney at nottingham.ac.uk
Wed Dec 28 09:35:49 GMT 2011


_level0.engine.fw from within the SWF
________________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of KnowledgeWare [knowledgeware at kccsoft.com]
Sent: 27 December 2011 21:04
To: Xerte discussion list
Subject: [Xerte] swf inside xerte navigation question

This is going to sound complicated but I think its probably simple, but my low level of actionscript navigation obscures the answer to me. I think it is all a matter of properly addressing the nodes, which I’m obviously not doing.

Everything is fine in my desktop xerte app. The program navigates from a flash menu to any of a number of frameworks with entrypanes which includes a ‘Next’ and ‘Previous’ button to take the user through the FW pages. Once at the end of the pages in the FW it goes back to the main menu (shows the menu as visible). This is the structure for this:

[cid:image001.png at 01CCC496.4B540DC0]

Next Page script code: (works fine)

if(fw.currentPage < fw.pages.length - 1)
{
fw.nextPage();
dummy = '<b>Part '+ part + ' - Module ' + module + ' - Page '+(fw.currentPage+1) + ' of ' + fw.pageCount + ' - '+partname;
showcurrentpage.setText(dummy);

}
else
{
                  _level0.engine.rootIcon.navigate('menu');
}

Problem: I inserted Flash swf buttons (tutorialnavbuttons icon below) – and am attempting to use similar navigation code as above inside the swf button file. This breaks the navigation – I believe the ‘fw.currentpage’ etc. is no longer recognized….but I don’t know how to have the SWF file recognize the framework that I am in, and ‘currentpage’, etc. How should I address those nodes in the SWF file?

[cid:image002.png at 01CCC496.4B540DC0]

SWF file code on the ‘Next’ button:  (it now always flows through the ‘else’ statement and goes to the menu – is there a way I can make it recognize the ‘fw.currentpage’ etc?

NextButton.onRelease = function()
{

                if(fw.currentPage < fw.pages.length - 1)    //THIS STATEMENT IS NO LONGER WORKING
{
fw.nextPage();
dummy = '<b>Part '+ part + ' - Module ' + module + ' - Page '+(fw.currentPage+1) + ' of ' + fw.pageCount + ' - '+partname;
showcurrentpage.setText(dummy);

}
else
{
                  _level0.engine.rootIcon.navigate('menu');
}

}

Thanks for any suggestions!

RonM2



More information about the Xerte mailing list