Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Picture Viewer Script w/ Next & Previous Buttons

Solution ;Alan's picture viewer script
;Put the following script in a spot.
;Put the pictures you want to be shown in the same spot.
ON ENTER
{
linkspot GLOBAL ME linkspot =
0 ME SETSPOTSTATELOCAL
}
ON ALARM
{
cmd GLOBAL
;***Set number of pictures here***
5 nbrpics =
;***End of data***
{ ME GETSPOTSTATE 1 + nbrpics % ME SETSPOTSTATELOCAL } cmd "next" == IF
{ ME GETSPOTSTATE 1 - nbrpics + nbrpictures % ME SETSPOTSTATELOCAL } cmd "previous" == IF
}




;Put the following script in a "next" spot
ON SELECT
{
linkspot GLOBAL
cmd GLOBAL
"next" cmd =
0 linkspot SETALARM
}


;Put the following script in a "previous" spot
ON SELECT
{
linkspot GLOBAL
cmd GLOBAL
"previous" cmd =
0 linkspot SETALARM
}
 
Was this article helpful? yes / no
Article details
Article ID: 28
Category: Room Scripts
Date added: 04-02-2011 12:33:24
Views: 1182
Rating (Votes): Article rated 3.0/5.0 (2)

 
<< Go back

Powered by Help Desk Software HESK™