easy iphone export

Discussion and feedback on Construct 2

Post » Fri Mar 23, 2012 6:21 pm

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
B
2
Posts: 6
Reputation: 337

Post » Fri Mar 23, 2012 7:14 pm

I don't have flash cs5 but this is clever:)

Thanks for sharing
B
13
S
2
G
1
Posts: 85
Reputation: 1,502

Post » Fri Mar 23, 2012 7:48 pm

i wish ashely make these in the new version of c2 because im really don't know these stuffs , i failed in something more easier than that lol , good luck ^^ and thanks!
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Fri Mar 23, 2012 8:07 pm

What exactly is the advantage of this over PhoneGap? They both use the same phone browser, so isn't it quicker/easier just to use PhoneGap Build?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Mar 23, 2012 9:45 pm

i dont suppose that there is any advantage between this method or phonegap i was aiming this at exsiting flash owners

and as far as i can understand phonegap is that it requires a mac to compile to native app in xcode. And for windows users this can be difficult

i know there are options like hackintosh or through virtualization but this violates apples terms


and i am not clear on exactly how phonegap build services works so i apologise if i get this wrong but as far as i understand phonegap build does build native apps but only 1 app store ready app on the free service unless you subscribe to the paid service which can streach from 120 dollars to 900 dollars a year and i am sure that existing users have many game projects that they would consider app store material

plus this could be a easy cross platform project for people to try eg

construct 2 to flash to nativeapp which can be signed and submitted to the app store

and just want to say construct 2 is a great program
B
2
Posts: 6
Reputation: 337

Post » Fri Mar 23, 2012 9:49 pm

i will continue working on the as3 code as well in the hopes of improving the code
B
2
Posts: 6
Reputation: 337

Post » Fri Mar 23, 2012 11:07 pm

@crow34, PhoneGap Build doesn't require a Mac, you just upload a zip of the exported PhoneGap project and it can build an IPA. You do need a Mac to set it up and sign up for the Apple dev account though, but you can borrow one for that, and you'll need to do that anyway if you want to publish an iOS app.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Mar 24, 2012 4:08 am

borrow a mac? where?
B
2
Posts: 6
Reputation: 337

Post » Sat Mar 24, 2012 4:14 am

borrow a mac huh? besides publishing through adobe air i dont need a mac to sign my app or upload to the app store
B
2
Posts: 6
Reputation: 337

Post » Sat May 25, 2013 6:37 am

Just go to the apple store,, there are lots of Macs available for you to use, all those people there are not buying, they are borrowing Macs :)
B
6
Posts: 15
Reputation: 331

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests