You are not logged in.

1

Tuesday, June 4th 2013, 10:01pm

Stageheight and stagewidth depended stagescale without onresize event?

Hi all,

Is it possible to check the stagewidth and stageheight without using the onresize event?

This is the code I use.

<action name="checkReso">
if(device.html5,
if(stagewidth GT 770,
if(stageheight GT 790, set(stagescale,1.2));
);
);

if(device.html5,
if(stageheight LT 750, set(stagescale,0.7));
);
</action>

<events onresize="checkReso();" />


It's now only working when you change orientation. But I need it right from the start.

Does someone know if this is possible?

2

Thursday, June 6th 2013, 8:48am

Hi,

you can start your action in any way you want. You could put it into the global or scene onstart-event, into the onsceneloaded-event, into any plugins or hotspots onloaded-event etc. If you choose to use the global onstart-event the action starts once every time you start the tour.

LG
Nupsi

3

Friday, June 7th 2013, 10:56am

Hi Nupsi,

Thanks, that's what i tried to do. But it doesn't seem to work. The only way i seems to work is via the onresize event.

Any other possibility's?

4

Saturday, June 8th 2013, 1:21pm

Or maybe there is another solution to scale in HTML5 depending on resolution?

5

Monday, June 10th 2013, 8:48pm

Hi,

getting the stagewidth, stagegheight values and setting the stagescale setting is possible anytime.

But note - when changing the stagescale setting, the stagewidth and stageheight will get changed and an new onresize event will happen.

Best regards,
Klaus

6

Friday, June 14th 2013, 9:51am

Hi,

getting the stagewidth, stagegheight values and setting the stagescale setting is possible anytime.

But note - when changing the stagescale setting, the stagewidth and stageheight will get changed and an new onresize event will happen.

Best regards,
Klaus
Hi Klaus,

Thanks for support. But when I load the tour on a iPad, the stagescale is not changed at first. I need to change orientation before the first if-statement will be executed correctly.


Btw, great that HTML5 multiresolution is comming!