How do you animate free-form titlebar buttons?

I have an idea for a free-form button animation I'd like to do, but I only want one of the states (mouseover) to be animated. I've reviewed the UIS2 skinning tutorial section on animated buttons, but it is more vague than I'd like.

How do you construct the source image?

If the animation has say 4 frames, would each button state require 4 tiles? Arrayed left-to-right, start-to-finish?

Does Animation/Frame Count refer to the total number of tiles in the image or just the number of tiles which constitute the animation cycle? And if the normal and pressed states are to be 'static', would they require 4 identical tiles each?

If yes, would the same number of tiles be required for the inactive window button states (uis2)?

Does WB expect to see an image with (e.g.) 4 tiles for each button state if you set the Animation/Frame Count to 4? Or do you only need the additional 'frames' placed in between the Active Pressed tile and the Inactive Normal tile, assuming only the Mouseover state is animated?

If you set the Frame Count to 4 and the Animation Rate to 250ms, will you get a repeating animation at 4 frames per second (while in that 'state') or just a single cycle?

Are any other settings besides Frame Count and Animation Rate needed to enable animation for a button?

Sorry there's so dang many questions in there, but inquiring minds want to know.

TIA.
2,445 views 4 replies
Reply #2 Top
Well, I followed the instructions here: WWW Link but the MouseEnter/Over/Leave attributes seem to be confusing to SKS. The anim.dll plugin appears to be called properly, best I can tell (I copied it into the skin's folder).

Here's the image:

--0---1----2----3----4---5----6----7----8---9---10--11--12--13

Here's a snap of SKS showing the code:


When I check the Inactive Window preview, the 4th tile in the immage is the one that shows up, not the 12th, suggesting SKS is still expecting 6 tiles total. Tiles 4 thru 11 (3 thru 10 to SKS since the 1st tile is "0") of the image are the animation tiles.

Any ideas? Is button animation kaput in WB5?
Reply #3 Top
OK, I figured out the the button Action needs to remain =0. That gets the animation working when the skin is applied.

However, the animation starts with the correct tile (2) but continues through all the remaining tiles & back to tile (2) rather than stopping at tile (10) as it should.

Also, tile (3) shows as the normal inactive button rather than tile (11).

It just occurred to me - maybe the animation tiles need to be tacked on to the right of the inactive window tiles. I'll give that a try & post back.

Talking to myself is such fun!
Reply #4 Top
Putting the inactive window button tiles in positions 3-4-5 fixes the inactive window displaying the "wrong" button. Score two for Daiwa.

However, setting the MouseEnterStartFrame to 6, the MouseOverStartFrame to 6 and the MouseOverStopFrame to 13 still does not restrict the animation to tiles 6 thru 13 - the 3 inactive button tiles are still showing up in the animation loop.

Close, but no cigar yet.

Maybe someone will care to join the conversation.