Skip to main content
Participant
May 6, 2009
Question

Is it possible to deliver IP-oriented content in Flash?

  • May 6, 2009
  • 1 reply
  • 1362 views

A client has asked for a flash product to be delivered with different content in different IP locations, particularly in different countries. It is a simple trick in HTML+Javascript world, but I am not sure about whether this is possible to be done in Actionscript 3.

Basically what they want is, if the swf is playing in Europe, Flash shows one version of content, and when the file is playing in America, it shows another version of the content.

If anyone knows if it is possible, please let me know, thank you in advance.

This topic has been closed for replies.

1 reply

Inspiring
May 6, 2009

Short answer is yes.

But there are many different ways. It depends what you mean by 'content'.

typically you would use a server script or webservice to get the country or region reference and just provide that to your actionscript (either via a call from actionscript or via flashvars from the outset).

for php, something like this: http://www.daniweb.com/forums/thread77998.html#

The simplest way (non actionscript) is to show a different swf by region.

Otherwise for actionscript based content differentiation (same swf) I would be inclined to pass the data into the swf using flashvars, so it doesn't need to make another call to retrieve it. The swf can then then do conditional logic based on the region or country data etc.

ttbackAuthor
Participant
May 6, 2009

I'm sure by using PHP should be possible. Unfortunately I can't use it.

Actually if I can use PHP, I can just ask the page to load a different version of the page with a different Flash file on it, that would solve all the problems easily.

However, I am unable to control the host or the host page of the swf file, so that I can't have variables passed in to condition the swf about what to load. All I can utilize is my swf file.

I would like to know more about your IP differentiation method for same swf.  "I would be inclined to pass the data into the swf using flashvars, so it doesn't need to make another call to retrieve it." I am not quite sure about what you mean what data you are passing in using flashvars. The data about host's IP address?

kglad
Community Expert
Community Expert
May 6, 2009

http://www.acidrazor.com/blog/ip-to-country-lookup-for-free-and-95-accurate/