appmobi supported orientations

Discussion and feedback on Construct 2

Post » Sat Feb 18, 2012 10:52 am

@Bert I think I'm having the same problem as you. Can you dumb it down for me please and explain exactly how u did it? Maybe just copy and paste the section of the html rather than just typing up the command. Would be a big help.
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Sat Feb 18, 2012 11:15 am

@FredQ edit exported for appmobi html, add this:
[code]AppMobi.device.setRotateOrientation('landscape');
AppMobi.device.setAutoRotate(false);[/code]
right after these lines:
[code]document.addEventListener("appMobi.device.ready", function ()
{[/code]
change landscape to portrait depending on what orientation you need.ranma2012-02-18 11:15:55
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sat Feb 18, 2012 12:22 pm

Thank you, works great, that's all I needed!

When exporting your project from C2 are you setting it as fullscreen (crop mode) or fullscreen (scale mode)? I'm having the problem where it looks great in the appMobi emulator but is stretched and won't fit the screen when actually played on my phone.
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Sat Feb 18, 2012 10:32 pm

I use full screen scale mode.

@ranma I got mine to work without this line:

AppMobi.device.setAutoRotate(false);

What does that one do? is it needed?
B
8
S
3
G
2
Posts: 107
Reputation: 2,219

Post » Sat Feb 18, 2012 10:36 pm



How do you get an image to also be a hyperlink, seems like I have to pick one or the other?
Bert2012-02-18 22:39:38
B
8
S
3
G
2
Posts: 107
Reputation: 2,219

Post » Sat Feb 18, 2012 10:43 pm

[QUOTE=FredQ] Thank you, works great, that's all I needed!

When exporting your project from C2 are you setting it as fullscreen (crop mode) or fullscreen (scale mode)? I'm having the problem where it looks great in the appMobi emulator but is stretched and won't fit the screen when actually played on my phone.[/QUOTE]

turn off the minifyer, if your problem is like the one here:
http://www.scirra.com/forum/fullscreen-scale-crop-mode-scaling-only-down_topic49244.html
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sat Feb 18, 2012 10:44 pm

[QUOTE=Bert] I use full screen scale mode.

@ranma I got mine to work without this line:

AppMobi.device.setAutoRotate(false);

What does that one do? is it needed?[/QUOTE]

it blocks automatic screen rotation when you rotate your mobile 180
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sat Feb 18, 2012 10:48 pm

@ranma thanks, but isn't that what this code does:?

AppMobi.device.setRotateOrientation('landscape');

Mine seems to work only with this one. I'm just wondering if there is an advantage to using both.
B
8
S
3
G
2
Posts: 107
Reputation: 2,219

Post » Sat Feb 18, 2012 10:56 pm

[QUOTE=Bert] @ranma thanks, but isn't that what this code does:?

AppMobi.device.setRotateOrientation('landscape');

Mine seems to work only with this one. I'm just wondering if there is an advantage to using both.[/QUOTE]

this line only prevents from going to portrait, you still have TWO options to go landscape, let's call it "left" and "right" landscape :) with [code]AppMobi.device.setAutoRotate(false);[/code] you get only "left" one :)
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sun Feb 19, 2012 2:45 am

Thanks Ranma
B
8
S
3
G
2
Posts: 107
Reputation: 2,219

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests