Letter A with onClick material colours
-
What would be the best way to make a sub-component (A_Letter) that changes it's colour from Black to Red while it it is inside a main component (A_Card) with onClick attributes? So you onClick on the A_Card component and the A_Letter subcomponent changes colour. I have included two colour swatches on the back of the A_Card so "Black_L" & "Red_L" materials are in model.
I've attached a SU 2017 model for anyone to play with if they could be bothered. Otherwise instructions, a link or eg. file would suffice.
I'm sure it is relatively simple, starting to think the same about me.
-
I choose generic red and black, rather than add a pallet, use SET("attribute",state1,state2,...stateN) for onClick in parent and reference the child material, named colors have to be text.
http://ruby.sketchup.com/Sketchup/Color.html
lists the standard colors that DCs (ruby) interpretsP.S.
I removed your existing materials replaced with default -
Thanks again pcmoor, nice "card trick":-)
What I can't figure out is why you need the Custom "f" attribute in the child component attributes? How does that work when it has no values & is not referenced by the parent component attributes?
-
a bit of junk, sorry can be deleted, can't recall why I started it.....sign of age?
Advertisement