Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Using Webkit inside of AIR to load in PHP

Community Beginner ,
Jun 04, 2012 Jun 04, 2012

Hello,

We have a game that we are developing for tablets that we are porting over from a browser based Flash game. In that game, there is a link to a PHP script that loads in player information and displays it on a web page. We would like to be able to reuse this functionality without having to rebuild it all in Flash for AIR. I know that AIR has Webkit support built in but I'm having a hell of a time finding out if it can display a web page from inside the application, rendered with PHP. Also I'm having trouble finding any information on how to actually use Webkit inside of AIR, other than an old mx:HTML component. Any help on this would be much appreciated.

TOPICS
Development
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2012 Jun 05, 2012

While it is possible to serve local html files to an instance of a StageWebView, it is not running as a server. Thus, your PHP code will NOT execute. You can display the html that lives on your server, since you are haing the user sign, some form of network access is need. You could look at using the SQLite DB to save the user information, so you could enable offline playability, then sync the data once there is a connection.

Here is something I wrote on using SWV and Google Maps. Maybe you can find it useful: http://chrisgriffith.wordpress.com/2011/01/04/integrating-maps-into-your-mobile-application/

Good luck,

Chris Griffith

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 05, 2012 Jun 05, 2012

Thanks. I think I just had a brainfart. Obviously if AIR can read in HTML it can call a PHP file on a server and read in the HTML it generates. My question now is that the component it uses to do this is <mx:HTML>. I know that a lot of the old mx components don't work in mobile AIR development. Will this one? I'm assuming it must since it's the only one of its kind.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2012 Jun 05, 2012
LATEST

Here is a sample of SWV & Flex:

http://cookbooks.adobe.com/post_Create_a_basic_web_browser_with_StageWebView-18850.html

I use with my several of my mobile apps that I have built.

Chris

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines