how do I make this iframe functional?

mumutti

Warper
Member
Joined
May 19, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Hi, so I managed to embed my website into the game. When the player clicks on computer, my website will open up via javascript iframe. Problem is, the website is not clickable, player can't browse it, it is just standing there.


How do I make the browser clickable/functional?

h3h3.jpg
 

sagebrushfire

Villager
Member
Joined
Jun 12, 2016
Messages
25
Reaction score
12
First Language
English
Primarily Uses
I'm not sure why you'd really want to do this but most likely it's because of how you're placing it in there and how the game is taking over touch/click events. One thing to try would be to implement this simple code: 


var touchEnabled = false; // set to true to enable touch again.

TouchInput._onMouseDown = function (event) {

if (touchEnabled === true)
{
// this is all the default code that would normally come from the core RMMV files.
if (event.button === 0) {
this._onLeftButtonDown(event);
} else if (event.button === 1) {
this._onMiddleButtonDown(event);
} else if (event.button === 2) {
this._onRightButtonDown(event);
}
}
};


Then you can just set the touchEnabled variable to on or off with a simple script. 


I also wrote this functionality into my Z_Core plugin so you could turn it on/off in the Plugin Manager. 





Aside from that it could be that your Iframe is just not in the right place.  You might need to give it absolute positioning with a top/left value, a height/width value and a z-index that's very large like 9999. 


You could also probably have your Iframe in your index.html page and set it up to be next to the main game area instead of on top of it. Then you'd want to set it to "display:none" and use some javascript in-game to change it back to "display:block" when you want it to show up. I haven't tested that out though. 
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top