[Xerte] displaying variable info in text icon

Johnathan Kemp johnathan.kemp at cxstaffs.co.uk
Thu Mar 4 15:53:46 GMT 2010


Further to my last posting.

Please find attached a version of the generic navigation that now includes a simple display of the page location e.g. page 1 of 7 in a text field on the Entry Frame. This version also resolves a few issues I found with the navigation when used in a frame.

Kind regards

Johnathan


Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk
01785 355714


 


-----Original Message-----
From: Johnathan Kemp [mailto:johnathan.kemp at cxstaffs.co.uk] 
Sent: 04 March 2010 11:25
To: Xerte discussion list
Subject: RE: [Xerte] displaying variable info in text icon

Whilst working on a wizard that allows routing to named pages I have developed a simple navigation model for an entry frame that will detect if it is located on a project interface or off a framework icon. It provides for home, previous, next, toc, back and last buttons, all of which can be displayed optionally by setting a flag value. It uses button.swf, but could easily be modified to use your own button icons. It automatically displays relevant buttons and hides irrelevant ones e.g. The home button does not display when on the first page, the back button does not display until you have been somewhere.

It may not give you everything you want but the code may provide the answer to some of your questions.

I want to include page x of y information, but have not attempted that yet (it's on my to do list)

If you would like to take a look at it, drop button.swf in your projects common folder, then select your interface icon and do File / Insert Model, selecting genericNavigation.rlm

If you already have an Entry Frame you may need to temporarily delete it as you can only have one Entry Frame in a Framework or Project.  

I hope it helps.

Kind regards

Johnathan


Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk
01785 355714


 


-----Original Message-----
From: Dave Burnett [mailto:d_b_burnett at hotmail.com]
Sent: 04 March 2010 10:46
To: Xerte list
Subject: RE: [Xerte] displaying variable info in text icon


Alternatively, you can hang all the paging code off the nav buttons, set up a blank text field somewhere and use setText to update it:



e.g. code under Next button:



page = i_main_frame.currentPage+2;

// i_main_frame= framework pages are attached to, +2 because 0 based 

page_count_display.setText('<pgcounter_text>Page ' + page + ' of ' + page_count + '</pgcounter_text>');

//page_count_display is empty text icon with text field positioned correctly

prev_page_rs._visible = 1;

//turn on the Previous page button (it starts out hidden)

if (page ==  page_count) {

next_page_rs._visible = 0;

}

//turn off the Next button at end of pages

i_main_frame.gotoPage((i_main_frame.currentPage+1));

//navigate

 

You can ignore <pgcounter_text>, it's a css style tag.





> From:
> xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of 
> ron at kccsoft.com
>
> Sent: Thursday, March 04, 2010 5:07 AM
>
> To: 'Xerte discussion list'
>
> Subject: [Xerte] displaying variable info in text icon
>
> From Paul's posting today:
> {'Page ' + (frameworkID.currentPage
> + 1) + ' of ' + (frameworkID.pageCount)}

> This should display these variables
> if pasted into a text icon, correct?

> It doesn't for me. I've spent many
> hours trying get {} to display variable information, I'm wondering if 
> there is some special setting somewhere in xerte that controls this. 
> Occasionally (maybe 1% of the time, in a new file) I can get a 
> display, but it's extremely unreliable. I'm sure it shouldn't be this difficult.

>
> I'm trying to build a FW navigation
> structure but its very hard to do without being able to see variable
> information:
>
>
>
>
>
>
>
> If FWICON.currentPage <
> FWICON.pages.length then
>
>
>
> Go to next
>
>
>
> Else
>
>
>
> Go to Main Menu
>
>
>
>
>
>
>
>
>
>
>
> What am I doing wrong?
>
>
>
>
>
>
>
> TIA RonM2
>
>
>
>
>
>
 		 	   		  
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/201469230/direct/01/_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

---------------------------------------------------------------------------------------

This email and any files transmitted with it are confidential and are intended solely for the use of the individual(s) or entity(s) to whom they are addressed. All messages are monitored for virus, high risk files and inappropriate content. As a result users should be aware that this mail maybe accessed, read and the right is reserved to reject, return, remove attachments or delete if considered to be inappropriate or unsuitable. Liability cannot be accepted for any loss or damage arising from this email (or any attachments) or from scripts or any virus transmitted.



This communication represents the originator's personal views and opinions, which do not necessarily reflect those of Connexions Staffordshire. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately reply to the sender or notify itsupport at cxstaffs.co.uk



Connexions Staffordshire Limited is registered in England No.4355170, Charity No.1121955. Registered office: Foregate House, 70 Foregate Street, Stafford, Staffordshire, ST16 2PX



Do you really need to print this email? It will use paper, add to your waste disposal costs and harm the environment.



Scanned by iCritical.

---------------------------------------------------------------------------------------






---------------------------------------------------------------------------------------

This email and any files transmitted with it are confidential and are intended solely for the use of the individual(s) or entity(s) to whom they are addressed. All messages are monitored for virus, high risk files and inappropriate content. As a result users should be aware that this mail maybe accessed, read and the right is reserved to reject, return, remove attachments or delete if considered to be inappropriate or unsuitable. Liability cannot be accepted for any loss or damage arising from this email (or any attachments) or from scripts or any virus transmitted.



This communication represents the originator's personal views and opinions, which do not necessarily reflect those of Connexions Staffordshire. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately reply to the sender or notify itsupport at cxstaffs.co.uk



Connexions Staffordshire Limited is registered in England No.4355170, Charity No.1121955. Registered office: Foregate House, 70 Foregate Street, Stafford, Staffordshire, ST16 2PX



Do you really need to print this email? It will use paper, add to your waste disposal costs and harm the environment.



Scanned by iCritical.

---------------------------------------------------------------------------------------





-------------- next part --------------
A non-text attachment was scrubbed...
Name: genericNavPageCount_1_03.rlm
Type: application/octet-stream
Size: 9126 bytes
Desc: genericNavPageCount_1_03.rlm
Url : http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100304/bf2cd0a9/genericNavPageCount_1_03.obj


More information about the Xerte mailing list