[PLUGIN] HTML | iFrame

Post your completed addons to share with the community

Post » Sun Feb 05, 2017 5:12 pm

@Nandynho

Please Help How can I set HTML code like this

Code: Select all
<img src='https://static2.scirra.net/avatars/128/2f07698752ba26223cea60cbb8980ff6.png' style='display:block'  onclick='window.open("Variable1", "sharer", "toolbar=0,status=0,width=548,height=325")'  />


Variable1 - Is link address and its different
B
18
S
6
G
2
Posts: 41
Reputation: 1,895

Post » Sun Feb 05, 2017 5:32 pm

@db3344 I do not understand what you want, what else do you need?
*about the size of the new screen if I'm not mistaken is a restriction of Node-Webkit.
**or are you trying to increase the size of the original image after the click?

Code: Select all
"<img src='" & var_img & "' style='display:block'  onclick='window.open(""" & var_img & """, ""sharer"", ""toolbar=0,status=0,width=548,height=325"")'/>"
Bitcoin Wallet: 1GCRqZExcP6svMdKGpCaRH4A8QAZtSjXxu
B
44
S
18
Posts: 178
Reputation: 3,566

Post » Mon Feb 06, 2017 8:14 am

Hello.
Thanks for your plugin, it is great.
I have a little problem.
Text fields are always in the foreground even if the layer is in the background.
How to fix this problem ?

Thank you.
B
4
S
1
Posts: 41
Reputation: 432

Post » Mon Feb 06, 2017 8:27 am

Hi @christ59 how are you?
There are two types of objects within Construct 2. Canvas and HTML.
Textbox and my plugin are HTML elements they will always be in front or they will be invisible, one overlaps the other.
Bitcoin Wallet: 1GCRqZExcP6svMdKGpCaRH4A8QAZtSjXxu
B
44
S
18
Posts: 178
Reputation: 3,566

Post » Mon Feb 06, 2017 8:42 am

Good thanks and you ?
Yes, I use your HTML textbox.
Still in the foreground?
Is not it possible to put it in the background?
B
4
S
1
Posts: 41
Reputation: 432

Post » Mon Feb 06, 2017 11:19 am

Good thanks!
Most plugins are placed inside canvas but some are HTML elements.

For an HTML element to appear it must be in front of the canvas, so it is not possible to place it in a 'background' layer because it is not inside the canvas.

The only one that can override HTML is another HTML element.
Bitcoin Wallet: 1GCRqZExcP6svMdKGpCaRH4A8QAZtSjXxu
B
44
S
18
Posts: 178
Reputation: 3,566

Post » Wed Feb 08, 2017 12:40 am

Hi Nandynho!

IT's pretty good that you continue the work of JesseJoh from his elements pack. I would recommend that you change the plugin ID though, because it conflicts with the old pack.

I do have one question though... for some reason Apple decided that they don't follow the same rules for iframe as every other manufacturer or developer (what a surprise about this) so on Apple devices you cannot specify the size of the iframe unless it's LARGER than the document that is displayed inside. On Apple devices it will force the iframe to be the maximum size to contain the document... overflow:hidden does not work.

After some research I have found something that (supposedly) works, but it's a bit of a hack. You have to make a DIV container around the iframe to force the size you want... basically using it like a wrapper. You set the heightt/width etc in the DIV wrapper and it will control the iframe sizing in iOS.

Code: Select all
<html>
  <body>
    <div id="wrapper">... old html goes here ...</div>
  </body>
</html>


I was wondering if it was possible to add this feature to the iframe plugin somehow, since it completely fails to display correctly in any Apple devices.

There is also one last feature request if it's possible... Apple have also decided that disallowing ZOOM is discriminatory, so you can no longer force a particular display level. This is a problem however in a C2 app when it's using scaling mode (letterbox scale/integer scale/etc) because the ZOOM feature of the iframe over-rides the C2 scaling - and causes the entire page to break. I want to make the iframe itself not able to zoom in or out, and have a nested container inside of it that will allow zoom without affecting the entire project. I wish Apple would leave the evaluation of "discrimination" up to the designer, and not some random thought they had during their morning bowel movements.

Is it possible to add to the plugin the turn off ZOOM of iframe (pinch/pull) on mobile devices (and CTRL+mouse scroll wheel) on PC/Windows?

Thanks a bunch for reading! Great work on continuing the plugin!

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Sat Feb 11, 2017 1:38 pm

Hi @SoldjahBoy sorry for the loooooong delay.
Putting the iframe inside a div in the current version is tricky as it opens up space for bugs.
The current version is stable. If the community helps with testing then I can do this.

First I need to test putting the iFrame inside a DIV:
New Version 1.25 (Feb 11, 2017)
  • [?] Test iframe inside div
  • [+] Disable right click.
    *only works with HTML.
New ID to differentiate with JesseJoh - Compatible with old projects
Last edited by Nandynho on Mon Feb 13, 2017 7:01 pm, edited 2 times in total.
Bitcoin Wallet: 1GCRqZExcP6svMdKGpCaRH4A8QAZtSjXxu
B
44
S
18
Posts: 178
Reputation: 3,566

Post » Mon Feb 13, 2017 10:35 am

Hello.
I can not open my projects because I have an error message telling me that I have to install "Plugin 'HTML | iFrame' by PlayLive".

But it is already installed (following your updates).
What should be done ?

Thank you for your help.
B
4
S
1
Posts: 41
Reputation: 432

Post » Mon Feb 13, 2017 7:05 pm

@christ59 I'm sorry for this, I did not expect anyone to download it for not having updated the homepage.
I do not know if I will keep this update just to test how it works with IOS but I can not test it.
They are not fundamental updates, only this should make a difference:
Image

Bitcoin Wallet: 1GCRqZExcP6svMdKGpCaRH4A8QAZtSjXxu
B
44
S
18
Posts: 178
Reputation: 3,566

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests