Mouse plugin stopping chrome from scrolling

0 favourites
  • 14 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • amirai.net/bugs/chromescroll.capx

    If you preview, and the canvas is taller than the browser window, chrome won't scroll the page using the scroll bar, though using the keyboard to scroll works. Delete the mouse plugin from the object bar, and it works again. Put a new mouse plugin back in, and it stops working again.

    Happens only in chrome, but importantly, also doesn't happen in a blank .capx trying to recreate the problem, indicating that it's also a problem with construct 2.

  • I can't seem to download/open the link. (Try setting your server's MIME type for .capx to application/octet-stream) Why do you want a canvas size bigger than the window though?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Whoops, sorry. Fixed: amirai.net/bugs/chromescroll.zip

    Basically I wanted to make a webpage with C2. I can fullscreen it and remake the scrolling with objects and events, but it seemed easier to just make the canvas the height of the page (not very tall, only about 1000 pixels or so) so I could use the browser's normal scrolling.

  • Sorry to hijack the topic, but is there any way to detect middle mouse scrolling? I wanted to do something similar once, except control scrolling through events. I abandoned it once I found the mouse object couldn't detect that, since it's what most people use for scrolling. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Since I'm currently recreating the scrolling with events in the website I'm making, I would really like to be able to detect the scroll wheel as well.

  • I'm not sure this is a situation we can support - the canvas is not designed to be bigger than the window, and if you use a fullscreen-in-browser setting there's no good way to integrate with the browser scrollbar. To be honest Construct 2 is designed as a game creator and not a website creator, so I don't want to get involved in adding features to design websites. You should be aware of severe shortcomings from designing websites like this: it's often inaccessible, will not be viewable on old browsers, it's unsearchable, untranslatable, does not integrate with browser forward/back, has no URLs to specific pages, cannot copy/paste text out the page, Google cannot index it so you'll get a rock bottom pagerank, etc. etc. Many of these issues cannot be fixed at all. Because of this I don't recommend making websites in Construct 2 and we probably won't fix any issues that crop up in trying to make websites. I highly recommend going back to HTML!

  • Ashley

    I understand that you don't want to add features to make web sites with construct 2, and I don't want to ask you to add any features like that, but that's not the issue here - the issue is that it works perfectly upon exporting, but not when previewing. It's not really adding any features, it's just making it consistent with the exported version that works properly. Surely consistency between the preview and the exported version is a good thing!

    Also, I've considered the things you've mentioned and depending on the website, I don't think most of them are that much of an issue. I can have a starter page that checks for HTML five support, and redirects the browser to the proper page. In this way, I end up having the benefits of having a normal HTML version and an HTML five version so all browsers can view the content properly in one way or another. Also, some pages don't really need forward and back if all the content is on one page. The page I'm designing is like that, and also doesn't have much text content for search engines to crawl through anyway.

  • The preview and export should look the same, yeah, but it's probably the fact non-fullscreen preview mode centers the canvas in the (non-scrollable) window for more convenient testing, and this is ideal for games and no game would ever have a non-fullscreen canvas bigger than the window. Can't you work around it by using a temporary smaller canvas during testing?

  • Hmm, if it's not a simple fix, I guess you're right that it doesn't really matter. As you mention, it's not hard to work around.

  • *cough* ... So scroll wheel detection isn't in the cards? <img src="smileys/smiley18.gif" border="0" align="middle" />

  • IIRC, mouse scroll wheel is not part of the HTML5 spec.

    I could (hope) to be wrong though.

    Apparently though. JQuery has a plugin to handle the scrolling mousewheel.

    That would be cool indeed if Ashley could have a look into it and managed "mixing" it in the mouse plugin.

  • I'll see if I can get mouse wheel events in the next build.

  • Sweet, thanks!

  • That would be awesome :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)