Skip to main content
Roshan Kolar Ganeshan
Inspiring
March 2, 2009
Answered

Accessing the disctionary to attain a VALID word

  • March 2, 2009
  • 3 replies
  • 1299 views
Hi There,

Im quite new to As 3.0 dictionary. Can anyone tell me how to send a word to the dictionary and get a true false result? I have a wordgame in mind. User selects letters and form a word, it would be great to send it to a dictionary - and then get a booloean return for the judgement and scoring. I came across the help which says AS 3.0 has a dictionary class.

Only if someone could link me to some online examples, or snippets which might be of great use.

Thanks and Regards,
This topic has been closed for replies.
Correct answer Greg Dove
Oh I didn't realise you were getting that error because you were offline... yes, Craig is right.
Re the dictionary service choice and risks: that is also true - you create an external dependency when you use a webservice.
Aonware was just the first one I found from a google search.
There are bound to be a number of others.
I couldn't find the api reference for dictionary.com, but the crossdomain permissions appear to be set up for access ( http://dictionary1.classic.reference.com/crossdomain.xml), for example.

The other thing to check with public webservices is the terms of use....

3 replies

Craig Grummitt
Inspiring
March 3, 2009
nice one GWD. i like.

only thing for you(roshankolar) to consider i guess though is that the future of your site would then depend on the future of aonaware.com. perhaps if you went this route, you could look into a backup plan if aonaware went down.

yes roshankolar, to open that URL, you will need to be online.
Greg DoveCorrect answer
Inspiring
March 3, 2009
Oh I didn't realise you were getting that error because you were offline... yes, Craig is right.
Re the dictionary service choice and risks: that is also true - you create an external dependency when you use a webservice.
Aonware was just the first one I found from a google search.
There are bound to be a number of others.
I couldn't find the api reference for dictionary.com, but the crossdomain permissions appear to be set up for access ( http://dictionary1.classic.reference.com/crossdomain.xml), for example.

The other thing to check with public webservices is the terms of use....
Roshan Kolar Ganeshan
Inspiring
March 4, 2009
Hi Craig and GWD,

I wasnt offline, it was the security sandbox and all the restrictions applied to the network settings. I got a open network and the funda works cool. And I realize the dependence on Aonware, I really need to hunt for other WDML resources. It was great researching and understanding the depths of webservice. Thanks a lot.

Regards,
Roshan
Inspiring
March 3, 2009
Hi, not sure why as its working fine for me when I paste that code into an empty as3 project in cs3.

But there is no IOError handler defined, and usually you would have one set up as well....
kglad
Community Expert
Community Expert
March 2, 2009
it's not a pre-built class like you're thinking.
Roshan Kolar Ganeshan
Inspiring
March 3, 2009
Hi Kglad,

Fine. Then how can I make use of a dictionary in Flash? I've presently made an array of words which I query on each submit attempt. I have searched online and someone has explained using a text file of words. But how am I supposed to know every word the user makes? The user has freedom to make any word from the letters on the stage, and it's my work to check if the selected work is a valid one or not.

Do you have any crude ideas how this might work for me? It would really help.

Regards,
Roshan
Craig Grummitt
Inspiring
March 3, 2009
You'll have to dig up a text file or xml file from somewhere with every english word contained within it, and then use that to search for the user's word's existence.

Does that answer your question? What exactly are you having trouble with? What do you mean by "how am I supposed to know every word the user makes"