PDA

View Full Version : [AS3] Word search and crossword puzzles


suhaib.ibrahim
09-26-2009, 01:17 PM
Hi all,

i am a biggener in actionscripting and i have to program Word search and crossword puzzles in my work using flash cs4 with As3, i googled for it but i couldn't found any free crossword puzzles with As3 (all i found is crossword puzzle with as2), and i didn't found any thing about wordsearch with as3.

the wordsearch i am searching for looks like this one:

http://img23.imageshack.us/img23/2329/99234889.jpg

can anybody help me, please??

Regards

matbury
09-26-2009, 06:21 PM
There's a book that has a chapter on creating dynamic word searches among other things. It doesn't include crosswords however. I wrote a review on it on my blog: http://matbury.com/wordpress/?p=236

Happy reading! :)

suhaib.ibrahim
09-27-2009, 07:32 AM
Thank you very much i will check it now

suhaib.ibrahim
09-27-2009, 08:07 AM
great i found the wordsearch template (the same project that the book is working on) on the following link:
http://www.4shared.com/file/56762792/78057858/A3GPU09_WordSearch.html\

i will edit it some how and it will be ready.

suhaib.ibrahim
09-27-2009, 02:41 PM
hay guys can anybody help me to find a solution for crossword using as3??

matbury
09-27-2009, 03:42 PM
The code will be very similar to the word search application. All you have to do is restrict the words on the grid to across and down and made the text the same colour as the background or set TextField.visible = false; or TextField.alpha = 0; whichever works best for the mouse over functions.

I'd recommend using a single "floating" input text field as managing input text field focus can be really difficult in situations like these. It'll also use less CPU resources. You'll also want to organise how the input text field manages going from one letter text field to the next, i.e. calculate the next text field for the word the user is inputting. I think this'll be the trickiest bit. I did it for a simple dictation exercise and that was difficult enough and ended up using a long series of if and switch-case statements.

Anyway, good luck and I hope this helps! :)

suhaib.ibrahim
09-28-2009, 09:15 AM
Thank you very much i will try this now, really good idia :)

matbury
09-28-2009, 11:56 AM
Another thing, the code that word search is procedural and a bit hacky. It'd be much easier to manage if you convert it to OOP.

Good luck!

attunedesigns
10-01-2009, 12:56 AM
There's an new book out called Real World Flash Game Development that has a section on crossword puzzles. Done in proper OOP and well-written! You can study the files from that chapter at the site-- http://www.flashgamebook.com/2009/07/26/chapter-9/