How to create interactive scenes as Pottermore?
zankougdr

Hi Clockwork Chilli Emoticon grin Thank you for making available to us this engine. I explored the site and found it AMAZING !!!! I was wondering if it was possible do an interactive scene, as this https://www.pottermore.com/en/explore-the-stories
Through the movement of the mouse allows the scene from translating the layers, as if it were a "move mode (a parallax effect). Then if you double-click on the scene, runs a zoom, infact the scene is divided in three zoom layers....is this possible? can you help me with these things I want to learn? At least direct me to the appropriate code to do all this. (English is not my language, which is why I can not understand some concepts)

Comments 16 to 23 (23 total)
Gio

Yes, like I said you can use onKeyDown or onKeyUp instead of onClick to execute that function when a key is pressed (or released). Have a look at the data that's passed into that function (in particular keyCode) to see which key was pressed.

 

There isn't a double click event, but you could easily simulate that by checking the time since the last click in your onClick function

zankougdr

Hello :). it is possible to fit the entire page of the scene at the window?

So that by reducing the page window, it shrinks the screen, and then all elements ...

[attachment=84:ops.jpg]

I need your help   ;)

Gio

Hi

 

The game area is automatically resized to fit the whole window (by default). However objects are not resized.

 

But if I understand correctly, you have a fixed-size background picture, with some objects on top, and you want everything to be resized to fill the whole screen. Is that right?

 

If so, you can do this:

wade.setMinScreenSize(width, height);wade.setMaxScreenSize(width, height);

where width and height are the size of your background picture.

zankougdr

Basically I put the link of the page of the game in a frame of a certain size ... but the area of the game does not fit the screen frame. It should appear entirely (Photo 1) but the area does not appear adapted (Photo 2) ... 

[attachment=85:ops.jpg]

So you're telling me that if I insert your code ... the area should resize the game, right? but where insert?

Gio

Sorry I forgot you're using the visual editor! In that case, you don't need to write that code, just go to the scene properties on the right-hand side (when no objects are selected). There are a couple of input boxes that say "Min Size" and "Max Size", that's where you want to put your numbers.

zankougdr

min size 0 0

max size 1200 600

default layer 1

yes, I already had done previously, the problem remains ...

if I restrict the browser window, all the elements are not restricted :( Why???

In the first picture it is normal ...
I reduced the window in the second photo ,
but should have resize everything like in the third image (edited with graphics programs, it is fake)
[attachment=86:ops.jpg]
Gio

You probably want

 

min size 1200 600

max size 1200 600

zankougdr

Wow *__*  it works :3  you are great!!!! Thanks Gio....

Post a reply
Add Attachment
Submit Reply
Login to Reply