You are not logged in.

1

Friday, October 26th 2012, 12:53am

display PNG when button is clicked

Hi All,

I need to display a .png file when a button is clicked, and have it disappear when button is clicked again....I cant seem to make any headway.

any xml gurus out there ?

Dennis

2

Tuesday, October 30th 2012, 2:11pm

Hi,

here a very simple example:

first declare the image, hidden at start (visible=false):

Source code

1
2
3
4
5
6
<layer name="image"
       url="image.png"
       align="center"
       visible="false"
       onclick="set(visible,false);"
       />


and then an other image as button to show it:

Source code

1
2
3
4
5
6
<layer name="button"
       url="button.png"
       align="bottom"
       y="10"
       onclick="set(layer[image].visible,true);"
       />


best regards,
Klaus