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?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement