Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Incrementing a page number?

$
0
0

Hey,

 

I need to be able to click on my previous and next buttons to navigate between different html pages. These pages will have the naming convention 'Page 1.html'...'Page 2.html'. I want to be able to know what page I am on and then the next/previous button will increment the current page by 1.

 

So for example in Page 1.html:

 

My stage code

 

//create variable which holds current page number

sym.setVariable("page", 1);

 

 

Next Button OnClick Code

 

//Get page variable

var page = sym.getVariable("page");

 

//Open next page and increment by 1

window.open("Layout " + (page + 1) + ".html", "_self"); *This is the peice of code Im trying to get working!

 

 

Can anyone help me on how to add a variable number into the URL?

 

Thanks for any help!


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>