[Plugins] Pode HTML Pack

Post your completed addons to share with the community

Post » Thu Oct 02, 2014 4:25 pm

Hey guys,
I met a jquery error at the layout where I put this iframe..anyone met the same problem?

Please help.. :?
B
3
Posts: 2
Reputation: 179

Post » Thu Oct 09, 2014 1:38 pm

when i try to put my website in iframe the web site opens full screen! not within the i frame, as if it goes into the website home page and the back button in firefox browser is gray! no back to the application ! can you help me please solving this problem? your plugin is really awesome and i need to use it , thanks
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Wed Nov 19, 2014 3:35 pm

Hi Pode.

I was just running a YouTube video through an iframe in a Construct 2 program via Chrome on my Samsung S3. It normally runs fine but has just returned the following error. Just thought I should let you know as the message asks me to report it to the developer.

Javascript error!
Uncaught TypeError: Cannot read property 'prototype' of undefined http://192.168.1.117:50000/ HTML_iFrame_Pode_plugin.js, line 98 (col 49)
This is likely a bug in Construct 2 or a third part plugin or behavior - please report it to the developer. Subsequent errors will be logged to the console.

P.S. Thanks for the plugin. :)
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Tue Nov 25, 2014 7:56 pm

Hi Pode,
Thankyou for this plugin. I have a question about the iFrame

At runtime, is there a way for me to click on an object (image/buttons/ect) inside the HTML/iFrame and have it call a function in Construct 2 and also sent an ID of what get clicked.

IS there a javascript I have to write for the webpage itself?

Thank you.
B
6
S
2
Posts: 16
Reputation: 494

Post » Tue Nov 25, 2014 8:24 pm

AxeSaber wrote:Hi Pode,
Thankyou for this plugin. I have a question about the iFrame

At runtime, is there a way for me to click on an object (image/buttons/ect) inside the HTML/iFrame and have it call a function in Construct 2 and also sent an ID of what get clicked.

IS there a javascript I have to write for the webpage itself?

Thank you.


I'm also interesting @Pode. And is possible to move the iframe under the canvas
B
60
S
9
G
7
Posts: 176
Reputation: 8,794

Post » Tue Nov 25, 2014 9:55 pm

. @AxeSaber @felixsg

You can use the hashtags (#) of the objects to know when the user clicks on an object that is inside the Iframe, and what object was it.

here is a very simple example: LINK

and here is its .capx: CAPX

I hope it is usefull.
you can also use ? instead of #, depends on your needs and what suits you.
B
8
S
3
Posts: 22
Reputation: 744

Post » Wed Nov 26, 2014 7:23 pm

Thanks I try the capx and not work like the online demo
B
60
S
9
G
7
Posts: 176
Reputation: 8,794

Post » Wed Nov 26, 2014 11:26 pm

The capx is not working like the online demo. I'm guessing that the browser does not like to load the hashtags if it from a local computer instead of it being on the internet.

I think I have found another solution:
Have the html call
"<script>
localStorage.setItem("MySavedKey", "MyVariable");
"</script>

create a plugin that have a Expression
and return the string of:
localStorage.getItem("MySavedKey")

the expression will return "MyVariable"

I have not combine it with this html code
<button onclick="myFunction()">Click me</button>

<script>
function myFunction() {
localStorage.setItem("MySavedKey", "MyVariable");
}
</script>

I haven't tested it yet. It going to take me sometime within the next week to test it.
Last edited by AxeSaber on Mon Dec 01, 2014 3:41 pm, edited 1 time in total.
B
6
S
2
Posts: 16
Reputation: 494

Post » Fri Nov 28, 2014 3:29 am

Posting just in case it helps someone else;

I was having issues with sizing of the iframe - on iPad everything seemed okay, but on a desktop the frame was significantly smaller. (assuming this is because the sizing was based in pixels, and the total width of my project window was only 854px anyway. So really, it was doing what it was supposed to, I was just after something more responsive.)
I tried using css which would be triggered when NOT on a mobile device, but the whole iframe disappeared on me. (it could have been my bad re: css though...)

In the end the fix was to add css to the completed .html file built by Construct where the standard body and canvas css styles are set - I used the id of the iframe (set in Pode's plugin) to specify a size based on viewport width and height, and now everything seems to work fine in multiple browsers as well as on iOS. For example:
Code: Select all
#ID_of_iframe {
   height: 85vh; !important
   width: 56.5vw; !important
}

There is probably a better way to do this, but it worked for me with my simple setup.

Hope this helps someone!
B
7
S
1
Posts: 12
Reputation: 352

Post » Tue Dec 02, 2014 8:35 pm

@tumira Out of curiosity (and out of hope that you can answer quicker than I can grep and figure it out on my own) what did you do to stop the shakiness of the iFrame, and do you think it would fix the seeming similiar issue with the div plugin? If so, I don't mind manually changing my runtime if you would kindly let me know how you solved the issue.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests