I've experiemented a bit with Google Image Search API for Flash/AS3
and built a working demo of a little 'memory match game' that lets the
player use actual image results for the game. However, the game only
works in sandbox mode (Flash CS4) where the JSON parses nicely and the
images are loaded - on my server, the images sadly never load. Here's
a link to the (broken) game:
http://www.abstracttravels.com/endlessmemory/index.html
I'm wondering if it has to do with the HTTP referrer header - I've
noticed that the ActionScript snippet on this page doesn't include any
referrer info, unlike all the other snippets (Java, PHP, Python,
Perl):
http://code.google.com/apis/imagesearch/v1/jsondevguide.html#json_snippets_flash
Is that because Flash somehow includes referrers automatically, or
else, wouldn't it be an improvement to have a working snippet on that
page, including the http referer header?
Or could it be something else preventing the game from working? I have
a valid API Key, and display some static "Powered by Google" branding.
I'm not sending a userip (since that needs to be detected server-side,
so I'd rather avoid it as long as it isn't strictly required).
Well, I'll appreciate any help trouble-shooting this, as I think the
memory game would be a cool thing to feature on my site :)