3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: button problem!!!
[Re: Silent_Assassin]
#88324
09/01/06 09:04
09/01/06 09:04
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Quote:
4. I want the sit bmap to change into the sit button bmap.. both have been defined.
Change by what? If the mouse is over the button or when its clicked on? If its just all about changing the bmap of the button while the mouse is over it here is your solution: Code:
bmap sitbutton = "sitbutton.bmp"; bmap sit = "sit.bmp";
panel panel1 { pos_x = 70; pos_y = 600; layer = 1; button = 0, 0, sit, sit, sitbutton, null, null, null; flags = visible, transparent; }
|
|
|
Re: button problem!!!
[Re: Xarthor]
#88329
09/04/06 04:42
09/04/06 04:42
|
Joined: Jun 2005
Posts: 734 Under your couch
Silent_Assassin
OP
Developer
|
OP
Developer
Joined: Jun 2005
Posts: 734
Under your couch
|
I am using A6 version 6.40.5
The errors i am getting are...
34:0 Error(57):Parameter unknown _arg1 Parameter
35:0 Error(57:Parameter unknown _arg1 Parameter
36:0 Error(96):Syntax error -nonexistent/empty function change_sitbtn
38:0 Error(19):Parameter unknown else bad keyword in {}
39:0 Error(19): Parameter unknown panel.bmap bad keyword in {}
Last edited by Silent_Assassin; 09/04/06 04:46.
|
|
|
Re: button problem!!!
[Re: Silent_Assassin]
#88330
09/04/06 09:17
09/04/06 09:17
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Well in the manual they use a similar code as example for "on_click" however I changed it a bit, now its just for panel1: Code:
bmap sitbutton ="sitbutton.bmp"; bmap sit = "sit.bmp";
function change_sitbtn(); //prototype, guess this is necessary with "on_click"
panel panel1 { bmap = sit; pos_x = 70; pos_y = 600; layer = 1; flags = visible,transparent; on_click = change_sitbtn; }
function change_sitbtn() { if(panel1.bmap == sit) { panel1.bmap = sitbutton; } else { panel1.bmap = sit; } }
EDIT: just took a look into the manual again, this should work too, according to the manual: Code:
bmap sitbutton ="sitbutton.bmp"; bmap sit = "sit.bmp";
function change_sitbtn(panel); //prototype
panel panel1 { bmap = sit; pos_x = 70; pos_y = 600; layer = 1; flags = visible,transparent; on_click = change_sitbtn; }
function change_sitbtn(panel) { if(panel.bmap == sit) { panel.bmap = sitbutton; } else { panel.bmap = sit; } }
Last edited by Thunder; 09/04/06 09:19.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|