It is currently April 28th, 2024, 11:55 am

Help with Next page button

Get help with creating, editing & fixing problems with skins
H1SWarrior
Posts: 3
Joined: May 12th, 2012, 11:24 pm

Help with Next page button

Post by H1SWarrior »

Hello guys, I was wandering if anyone knows the code to use that makes an arrow button that would link me to the next page. Here is a picture showing you what I mean:

Thanks,
H1SWarrior
You do not have the required permissions to view the files attached to this post.
User avatar
maxthegold
Posts: 19
Joined: February 11th, 2012, 6:18 am
Location: Kiama, NSW, Australia

Re: Help with Next page button

Post by maxthegold »

Try this,

Code: Select all

[msNextPage]
Measure=Calc
DynamicVariables=1
Formula=(#CurrentPage# % #NumberOfPages#) + 1

[msPreviousPage]
Measure=Calc
DynamicVariables=1
Formula=#CurrentPage# - 1 + (#CurrentPage# = 1 ? #NumberOfPages# : 0)

[msPage1State]
Measure=CALC
DynamicVariables=1
Formula=#CurrentPage#=1
IfEqualValue=1
IfEqualAction=!Execute [!ShowMeterGroup "Page1"][!HideMeter "btnSwitchToPreviousPage"]
IfBelowValue=1
IfBelowAction=!Execute [!HideMeterGroup "Page1"][!ShowMeter "btnSwitchToPreviousPage"]

[msPage2State]
Measure=CALC
DynamicVariables=1
Formula=#CurrentPage#=2
IfEqualValue=1
IfEqualAction=!ShowMeterGroup "Page2"
IfBelowValue=1
IfBelowAction=!HideMeterGroup "Page2"

[HelpPage1]
Meter=STRING
MeterStyle=StyleText
Hidden=0
Group=Page1
Text="...."

[HelpPage2]
Meter=STRING
MeterStyle=StyleText
Hidden=1
Group=Page2
Text="...."

[btnSwitchToNextPage]
Meter=Button
X=...
Y=...
ButtonImage=#CURRENTPATH#btn_forward.png
ButtonCommand=!SetVariable CurrentPage [msNextPage]
TooltipTitle="Page Forward"
TooltipText="Display the next page."
DynamicVariables=1

[btnSwitchToPreviousPage]
Meter=Button
X=...
Y=...
ButtonImage=#CURRENTPATH#btn_back.png
ButtonCommand=!SetVariable CurrentPage [msPreviousPage]
TooltipTitle="Page Backward"
TooltipText="Display the previous page."
DynamicVariables=1
This allows for hiding the previous button on page 1 and you can code similar for next button on the last page. Just repeat the STATE measures and the PAGE meters for however many pages you have. Set the variable for the number of pages you have. Set the X and Y values for the button positions.