Copy link to clipboard
Copied
Building an app to launch my website as soon as someone activates (touches the icon to launch) the app from their phone (Android phone or tablet).
Any help would be appreciated. I have the latest version of Flash Professional.
Thanks for your response.
Copy link to clipboard
Copied
use:
var htmlLoader:HTMLLoader=new HTMLLoader();
addChild(htmlLoader);
htmlLoader.width = stage.stageWidth;
htmlLoader.height = stage.stageHeight;
htmlLoader.load(new URLRequest("http://www.youwebsite.com"));
Copy link to clipboard
Copied
Thank you for your response.
I got this responce when I tried to run the code.
Scene 1, Layer 'Layer 1', Frame 1, Line 1 | 1046: Type was not found or was not a compile-time constant: HTMLLoader. |
Scene 1, Layer 'Layer 1', Frame 1, Line 1 | 1180: Call to a possibly undefined method HTMLLoader. |
Copy link to clipboard
Copied
I'm loading the code into the Actions file. I have Adobe Cloud with all the apps.
I hit control enter and tested with ActionScript 3.0 and Air for Android. Both gave me the same error message.
Also the simulator did not fully load.
I hope this helps. I most appreciate your help.
I'm using Lynda.com and Adobe TV to try to figure this out.
Thanks again for your help.
Copy link to clipboard
Copied
import all needed classes:
import flash.html.HTMLLoader;
Copy link to clipboard
Copied
I'll try this later. I appreciate your help with this.
I had placed this (import flash.html.HTMLLoader;) at the top of my file.
Thanks again.
You have an Impressive resume.
Copy link to clipboard
Copied
if you used that import statement and still saw that 1046 error, you're not publishing for air. check your publish settings.
Copy link to clipboard
Copied
Hey Kglad,
Your amazing... I've looked around to forum at some of your posts.
Here are the screen shots of what I'm doing. I test both on my cell and the simulator and get a pure white screen.
Icons are loaded and English for Languages.
I thought I was going to be able to do this... Here is all the information I loaded and still just have a white screen.
I really appreciate all you do.
Copy link to clipboard
Copied
i thought you said you were seeing a 1046 error message?
Copy link to clipboard
Copied
I was when I first started this post... Now I'm getting the simulator to load but it doesn't pull the website into the phone.
I know I'm probably missing some small thing. At least I hope its a small thing.
I have several pregnancy sites that I'm trying to optomize for mobil.
All your help is most appreciated.
Copy link to clipboard
Copied
This (HTMLLoader) feature is supported on all desktop operating systems, but is not supported on mobile devices or on AIR for TV devices. You can test for support at run time using the HTMLLoader.isSupported
property.
so, use stagewebview.
var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
webView.loadURL( "http://www.yourwebsite.com" );
Copy link to clipboard
Copied
You've been great and I'm feeling a little closer to the goal....
I used the stageview and loaded the app to my android and it works sort of...
Trying to have a browser open up and fill the screen with my website scaled to fit the screen both horizontally and vertically.
This is what I'm getting now... much improved over what I was getting before but still have to make it all adjust.
You've been awesome.... and thank you.
Thanks again for all your understanding and patience with us newbies.
Copy link to clipboard
Copied
you have almost no way to control the stagewebview using actionscript. i think the best you can do (with actionscript) is to use the code i showed to open a full stage view.
however, you can use javascript on the opened web page (assuming you control it) and you can call any javascript function in the loaded web page
Find more inspiration, events, and resources on the new Adobe Community
Explore Now