I finally had the time to dive back into this project and managed to get everything working exactly as I was hoping.... locally! After uploading the game to a server it suddenly stops working again. From my knowledge with Flash games and further testing, I believe it has to do with the cross-domain-policy for Wikitionary, which is usually an xml set up on the server.

While attempting to locate the current Wikimedia policy I ran into random comments with warnings about the security risks involved in using the cross-domain-policy. I also discovered that Bugfix 1.9 states "Partial support for Flash cross-domain-policy filtering."

I'm not sure where to go from here. Is there a confirmed and allowed method to programmatically pull the rendered HTML from Wiktionary that can then be parsed?

Thanks,
Aaron.




On Sun, Apr 25, 2010 at 3:43 PM, Conrad Irwin <conrad.irwin@googlemail.com> wrote:

On 04/25/2010 11:32 PM, Aaron Ward wrote:
> Hello there!
>
> I'm a Flash Video Game Developer working on a word based game. I stumbled
> across the MediaWiki API component during my research and I've been testing
> it locally in the game to retrieve word definitions and displaying them in
> the game for the player. In general, everything works great locally, but
> there's a few odd issues that I'd like to get worked out, if possible.
>

As in the forum, you can get definitions from Wiktionary, though it's
not quite that simple (there is not a "data" API to Wiktionary, you can
only get the page text).

You have a choice between:

1. Getting the raw text of the page with the API and extracting the
lines that start with a # for definitions.
2. Getting the rendered HTML of the page as normal, and extracting the
contents of the <ol> in <div id="bodyContent">.
3. Creating something easier to use with the pre-extracted lists at
 http://toolserver.org/~enwikt/definitions.

In an ideal world there would be a public API using the data from (3),
but no one has done that yet.

Conrad