I am working on a application and am trying to determine the best method of doing this:
Trying to create a word search game. I loaded a field table with data (1 character per column). On mouse down, I want to allow the user to be able to select the word. Currently I am creating a graphic each time the user selects data. Is this the best way to do this? Also, what would be the best way to return what the user selects?
Looking for any guidance.
Thanks,
Kosmo
Selecting data on mouse down
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Selecting data on mouse down
Hi.
Have no idea what you are trying to do. That said, it will be simple to accomplish, a hill of fun, and you will get all the help you need here.
One character per column? And a selection of one char chooses a word? Or does the user click on a series of characters? You have a table field or a data grid?
Write back with a little more info, maybe a screen shot.
Craig Newman
Have no idea what you are trying to do. That said, it will be simple to accomplish, a hill of fun, and you will get all the help you need here.
One character per column? And a selection of one char chooses a word? Or does the user click on a series of characters? You have a table field or a data grid?
Write back with a little more info, maybe a screen shot.
Craig Newman
Re: Selecting data on mouse down
Craig,
Thanks for taking the time to respond. Much appreciated!
It is a basic game of finding the word in scrambled letters.
Here are my questions:
I am trying to determine if it is best to load in a field table? Or is there a better way to do this?
Also...when I select a value should I create a graphic for each selection? For example, in the attachment, I would create 2 graphics - one for TREE and one for HOUSE.
How would I extract the characters that I select into a variable?
Example....I need to capture TREE and HOUSE in a variable. Basically whatever the user selects, I need to capture the data.
Thanks,
Kosmo
Thanks for taking the time to respond. Much appreciated!
It is a basic game of finding the word in scrambled letters.
Here are my questions:
I am trying to determine if it is best to load in a field table? Or is there a better way to do this?
Also...when I select a value should I create a graphic for each selection? For example, in the attachment, I would create 2 graphics - one for TREE and one for HOUSE.
How would I extract the characters that I select into a variable?
Example....I need to capture TREE and HOUSE in a variable. Basically whatever the user selects, I need to capture the data.
Thanks,
Kosmo
Re: Selecting data on mouse down
Oh, a word finder. Cool.
There are a bunch of small obstacles you have to deal with here, but it will be a great project. As one way to get started, make another field along with your table field. Put this in the table field script:
This works, but needs much refinement, and may not be the best method. For example, it will fail to load duplicate letters that really live next to each other. In fact, it is rather crude. But it may get you going...
You can try a bunch of other things, but you may find that the lines of the table field become selected or other oddities. Do keep at it, and report back.
Craig
There are a bunch of small obstacles you have to deal with here, but it will be a great project. As one way to get started, make another field along with your table field. Put this in the table field script:
Code: Select all
on mouseMove
if the optionkey is down then get the mouseText
if it = the last line of fld 2 then exit to top
put it into line the number of lines of fld 2 + 1 of fld 2
end mouseMove
You can try a bunch of other things, but you may find that the lines of the table field become selected or other oddities. Do keep at it, and report back.
Craig