Ego Depletion Task


Author
Message
danielle.allen09@Yahoo.com...
danielle.allen09@Yahoo.com
Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)
Group: Forum Members
Posts: 3, Visits: 11
I am trying to program an ego depletion task in which participants must 'cross out' all occurrences of the letter 'e' in a paragraph of text.  I want them to be able to click on letters in the text and the letter turn green; if they click it again, I would like the text to turn back to black.  I found this forum (http://www.millisecond.com/forums/Topic7396.aspx) which helped some, but this programs the entire word to turn green... I need the individual letters to turn green.

Any help on how to achieve this would be greatly appreciated!

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K
The approach to use is identical as the one outlined in the thread you referenced. The only difference is that you must represent every single *letter* as a separate <text> element instead of every single *word*.

danielle.allen09@Yahoo.com...
danielle.allen09@Yahoo.com
Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)Respected Member (307 reputation)
Group: Forum Members
Posts: 3, Visits: 11
Okay, that is what I was doing.  It was just getting a little complicated with the positioning of the words so I wanted to make sure there wasn't a shortcut I was missing.  Thanks!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K
No, there isn't any other shortcut, I'm afraid. The units you're interested in (here: individual letters) must be represented as distinct objects (here: a <text> element for each letter) for you to be able to interact with them. And yes, positioning all those objects can become a bit tedious. In that regard, note that elements can be positioned relative to each other (e.g. http://www.millisecond.com/forums/FindPost13663.aspx ).

Hope this clarifies.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search