HTML5 Mobile Extension

mdotedot

  • Posts: 1554
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: 187
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: 187
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: 1554
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: 187
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: 1554
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: 187
 I cannot use an iframe. The embedded page is an ad, the ad will not open in an iframe.

mdotedot

  • Posts: 1554
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.

FMStudioGameDev

  • *
  • Posts: 207
Hey M.E.
it looks like multitouch is not working anymore with Stencyl 4. Can you have a look at it?
Thanks

mdotedot

  • Posts: 1554
Took a look.

Publishing with Stencyl 10321.
Tablet Samsung TAB S3.
HTML5 Demo.
Clicked on all demos and apart from the https requirement they all ran.

Three finger movement on multitouch. (But I noticed that I first had to click on the table demo for instance to have them registered, but the same is true for the 3.4 demo publication)

Of course this can be related to your device or browser, but if you run the demo from 3.4 and 4.0 it should not be that different.
(Drawing has been changed a lot so the ThreeJS demo could fail)

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.

colburt187

  • *
  • Posts: 2373
Could i use this extension to purely check if my HTML5 game is running on mobile browser or not?

mdotedot

  • Posts: 1554
Could i use this extension to purely check if my HTML5 game is running on mobile browser or not?
Sorry, I do not understand the question. This extension doesn't check anything. Some mobile functionality isn't available on mobile browsers and this extension might help.
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.

colburt187

  • *
  • Posts: 2373
Currently my games are available in HTML5 on desktop browser but they are not playable on mobile browser as I don't spawn the buttons. I was looking for a way to check "if running on mobile browser"

mdotedot

  • Posts: 1554
Ah ! I understand.

Yes there is a block for that. If you start the Demo on a mobile device it shoud say : 'On Mobile: true' at the bottom left.
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.