Can't "save" an image for a state
So object shows empty
Friday, August 19, 2005 by whiterabbit007 | Discussion: DesktopX Development
I tried creating custom states in the OnScriptEnter function by doing something like this:
Object.State = "stateA"
Object.States("StateA").Picture = imageA
Object.State = "stateB"
Object.States("StateB").Picture = imageB
And then when I need to change the image I do something like:
If something Then
Object.State = "stateA"
Object.Picture = imageA
Else
Object.State = "stateB"
Object.Picture = imageB
End If
Now, that just doesn't look right to me, but I've no idea what to do here
Anyway, it didn't work so I'd appreciate any help.
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Wednesday, August 24, 2005 11:33 AM
As for your script: if you predefine the state image of the object why would you need to redefine the image again on state change? If you just need the image to change depending on some external variable (ie: media player stops, etc.) omit the code line Object.State = ... as it's not necessary unless another script needs to know what state it is.
I hope this is understandable and that it helps.