Why isnt my switch-xxx.png working please?

Help each other out

Why isnt my switch-xxx.png working please?

Postby edgley on Sun Oct 24, 2004 11:22 pm

Once more my head is spinning.

All I want are two buttons, playalbum and openalbum

After looking at the other skins, it seems that I have to have 3 PNG for this to work:

switch-button.png
switch-button-enter.png
switch-button-down.png

I then add two buttons on a page, and in the ID field enter playalbum and openalbum. Then I add the events.

The buttons work, but clicking on one doesnt change the visible state of the other.

thanks

Simon.
edgley
 
Posts: 240
Joined: Wed Apr 21, 2004 4:44 pm
Location: london

Postby edgley on Sun Oct 24, 2004 11:31 pm

dang it, just worked it out.

This type of button doesnt understand openalbum.

These type of problems are very frustrating. Some buttons take this, some take that. I feel that there should be standards across the range. I shouldnt need a different type of button because of its ID, surley?

New problem.

I have now created three buttons:
playalbum, openalbum, addalbum

created around:
blank-button.png
blank-button-down.png
blank-button-enter.png

It so nearly works. The only thing that doesnt is that the open album button, once hit, always stays lit as on. The other buttons switch states correctly, but not this one.
edgley
 
Posts: 240
Joined: Wed Apr 21, 2004 4:44 pm
Location: london

Postby edgley on Tue Oct 26, 2004 11:57 pm

I have looked at the XML, and it is the same for all three buttons.

But once the openalbum one has been clicked, it never loses its down state.

help please!
edgley
 
Posts: 240
Joined: Wed Apr 21, 2004 4:44 pm
Location: london

Postby BaddaBing on Wed Oct 27, 2004 1:48 am

edgley,
I've never found any documentation on this feature, just kept hacking at it till it worked. This may not be the exact solution but these are the steps I have found to work. You need three things to make this button toggle work:

The buttons must have three states
    button.png
    button-enter.png
    button-down.png

    Image
The events called by the buttons must be named:
    album add
    album open
    album play

    Image
The buttons must have the correct ID assigned:
    addalbum
    playalbum
    openalbum

    Image

No need for 'switch-' or 'blank-' tags on the buttons
And it works just fine with either two or three buttons.

-baddabing
BaddaBing
 
Posts: 557
Joined: Fri Mar 26, 2004 2:39 pm
Location: DFW Texas

Postby edgley on Thu Oct 28, 2004 10:33 am

Thank you BaddaBing,

Now that know my theory is sound, it allowed me to play some more.

It turns out that there is a problem with my music screen. I added the buttons to a blank screen and all worked okay.

So I cloned my music screen, and it still didnt work. I then came up with the idea of adding the buttons to a blank page, and cut-and-pasted the xml from the old music page into the new one.

All now works as it should.

Thanks for your help.
edgley
 
Posts: 240
Joined: Wed Apr 21, 2004 4:44 pm
Location: london