hello my name is martin wood
after purchasing construct 2 i found the phonegap options some what lacking for windows users who wish to export to ios
so i decided to write some actionscript 3 code that will run html5 as a native app on iphone and i would like to offer the construct community the code as a welcome gift to the community as i am new to this forum
you will need flash cs5.5 to use this code(yes i did purchase the full version no pirate version lol)
anyway step one
create a flash ios document leave this file blank
then create a actionscript 3 class file for the document name the file main.as
next step copy and paste this code in to the main file
package
{
import flash.geom.Rectangle;
import flash.media.StageWebView;
import flash.filesystem.File;
import flash.display.MovieClip;
public class main extends MovieClip
{
private var webView:StageWebView;
public function main()
{
var url:String = File.applicationDirectory.resolvePath("html/index.html").nativePath;
webView = new StageWebView();
webView.stage = stage;
webView.viewPort = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);
webView.loadURL(url);
}
}
then save both files the fla and the as file in the same folder then create a folder in the same directory called html
next step add the folder html to the air for ios publish settings in flash
next step
open construct 2 and export your project as a html5 website to the html5 folder with full screen on crop enabled
remeber to make your project to the iphone screen size
once this is done return to flash and export your project with to air for ios
pros:- easy ios and android export using adobe air
cons:-can have some audio issues and some frame rate issues
if anybody can improve on this method please post and let me know
thankyou
regards
martin
sorry for the grammer and spelling