HTML5 Mobile Extension

mdotedot

  • *
  • Posts: 1368
An APK = Android is not equal to HTML5.
I'm not going to do anything on APKs

I looked in both the mdot link as the previous one





And



Both of them are not showing <webview>

One of them has <object>  which is not the same as webview

That you think it is a webview does not mean it is actual a webview element!

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

NOTA

  • Posts: 178
I just went back and looked at   "Can you provide an example that works with webview on HTML5 on Chrome?"

I have been unsuccessful.
 Android is the only config. I have been able to create  successfully.

NOTA

  • Posts: 178
When I open thjs, this is what I see.
};
var WebViews = function() { };
$hxClasses["WebViews"] = WebViews;
WebViews.__name__ = ["WebViews"];
WebViews.showWebview = function(url,width,height,positionX,positionY) {
   if(positionY == null) positionY = 0;
   if(positionX == null) positionX = 0;
   if(height == null) height = 0;
   if(width == null) width = 0;
   if(url == null) url = "none";
};
WebViews.hideWebview = function() {
///////////////////////////////////////////////////

com_stencyl_behavior_Script.runLater(2000,function(timeTask2) {
         if(_g.wrapper.enabled) WebViews.showWebview("http://tapdroid.com",800,1800,-900,1);
      },null);
      com_stencyl_behavior_Script.runPeriodically(15000,function(timeTask3) {
         if(_g.wrapper.enabled) {
            com_stencyl_behavior_Script.saveGame("mySave",function(success) {
            });
/////////////////////////////////////////////////////var WebViews = function() { };
$hxClasses["WebViews"] = WebViews;
WebViews.__name__ = ["WebViews"];
WebViews.showWebview = function(url,width,height,positionX,positionY) {
   if(positionY == null) positionY = 0;
   if(positionX == null) positionX = 0;
   if(height == null) height = 0;
   if(width == null) width = 0;
   if(url == null) url = "none";
};
WebViews.hideWebview = function() {
};
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\com_stencyl_behavior_Script.runLater(2000,function(timeTask2) {
         if(_g.wrapper.enabled) WebViews.showWebview("http://tapdroid.com",800,1800,-900,1);
      },null);

mdotedot

  • *
  • Posts: 1368
Those are functions, not HTML5 elements
Code: [Select]
var WebViews = function() {
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

NOTA

  • Posts: 178
I added this html5 to the page.  It seams to work. Is this any good?

<div id="Layer4" style="position:absolute; left:3px; top:2001px; width:969px; height:597px; z-index:11"><link rel="import" href="http://tapdroid.com/mobilead"></div>

mdotedot

  • *
  • Posts: 1368
This doesn't have to do anything with the html5 tag webview. Which I very much doubt as being a non-android support tag.

If you want embedded website in your HTML5 game you can use DIV and IFRAME for instance.
You can use the block : [HTML5: Native Javascript (no double quotes!): [] ]

Check out the way elements are created dynamically (use google)

You can put something like this in that native block:
Code: [Select]
var iframe = document.createElement('iframe'); var html = '<body onLoad=document.location.href=\'http://www.photoquesting.com\'></body>'; document.body.appendChild(iframe); iframe.contentWindow.document.open(); iframe.contentWindow.document.write(html); iframe.contentWindow.document.close();


Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

NOTA

  • Posts: 178
 I cannot use an iframe. The embedded page is an ad, the ad will not open in an iframe.

mdotedot

  • *
  • Posts: 1368
Maybe you should try to use your own code in the Native block
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.