I'm just getting started, I can't find a way to edit the .style for each state. Is this possible?
Most errors comeback as undefined is not a function
Hey Taurean Bryant, while you can only define layer properties when defining new States, it's possible to change style properties based on State Events or on specific States. For example:
if layerA.states.current is "stateB"____layerA.style.color = "blue"
Benjamin Den Boer this worked exactly how I needed it, and I can see this being crazy useful. Thanks!
I may have spoken too soon. When I am defining the current state as layerA.states.switch("stateB") it works perfectly, but if I'm doing an on click state switch it won't pull from the style like that. My guess is because the script has already been executed so the other states styling is not being used.
Any ideas on how to circumvent that?
Taurean Bryant could you attach your prototype / a code sample?
Benjamin Den Boer http://cl.ly/3G3g2u0D0N3r file is kind of a mess though
Hey Taurean Bryant, you've defined new style properties based on the states "focused" and "selected" but on click events you switch between "default" and "selected". Perhaps that's the issue?
(You've defined a unique set of styles for "focused" but you never switch to that state)
Benjamin Den Boer I must have sent you a later file that was mid-process in trying something else my bad. I'll try to send you a better one so you can see whats going on. Thanks though!