I have built a wordsearch but I don't know the script to let the user highlight each letter which will then elastic band the word. I don't want to get into complicated scripting where the word must match the listed word I just want a simple solution - at the moment the only way I can think of doing it is by using the co-ordinate positioning?
It is also important to not allow an elastic band of the group of letters if it is wrong - again I am thinking could this be based on co-ordinates?
Any suggestions very welcome!!!! It's diving me mad
Offline
Hey To select a letter and highlight it, you should make a square the same NxN area as the square the letters are in. Then, set the square's x and y to:
Set x to ((Round (([X Position v] of [Ball v]) / (N))) * (N)) Set y to ((Round (([Y Position v] of [Ball v]) / (N))) * (N))This will only allow the highlighter to highlight a letter. Then, when mouse clicked, have it stop the script above and stay in position. Have another highlighter then go to the mouse and do the same until mouse down. So now there are 2 Highlighted squares on the grid. Assuming you have no diagonal words (makes it easier), you can keep the second highligher in line with the first by making a condition, the x or y position of the second highligher must = the x or y of the first, thus locking it in the x or y axis of the original highlighed square. You could then use the pen or something to do the 'elastic band effect'.
Last edited by Prestige (2012-07-19 10:49:01)
Offline