Highlighted

disable orientation animation

Participant ,
Aug 17, 2018

Copy link to clipboard

Copied

Is there a way to prevent the animation that occurs when the device is rotated.

I still want the rotation to occur, just not the timely animation that spins it?

Is it possible?

TOPICS
Development

Views

277

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

disable orientation animation

Participant ,
Aug 17, 2018

Copy link to clipboard

Copied

Is there a way to prevent the animation that occurs when the device is rotated.

I still want the rotation to occur, just not the timely animation that spins it?

Is it possible?

TOPICS
Development

Views

278

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 17, 2018 0
Adobe Community Professional ,
Aug 17, 2018

Copy link to clipboard

Copied

You could turn off auto rotate and then read the accelerometers to decide when to change the orientation. Doing it that way should skip the rotation. It can get complicated though, on iOS anyway, because what is considered up on iPhone isn't the same on iPad.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 17, 2018 0
Participant ,
Aug 18, 2018

Copy link to clipboard

Copied

thanks colin

only problem is I want the OS to rotate because I want the keyboard to move. Picture it like this - imagine the ipad is flat on the table and two players are head to head.

When one touches a button i want the keyboard to be facing them and when the other touches a button i want the keyboard to face them.

Trying to find a way that works best without having to add my own keyboard in

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0
Adobe Community Professional ,
Aug 18, 2018

Copy link to clipboard

Copied

If it's flat on the table the OS won't get any orientation events, so you would need to fire those yourself. But I see the problem, the whole playing field would swing around too. If firing the event instantly switches the orientation you could rotate your playing field movieclip 180 degrees, so player 1 would be playing with a correct way up view, and player 2 would play with an upside-down view. But it would look correct to them because the OS had rotated everything. The keyboard would be correct for player 2.

If you do still see the rotation effect you could fade out the playing field for a moment, to make it less distracting.

From what I've seen, and had to do as workarounds, I think if you do the orientation event it should switch instantly.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0
Participant ,
Aug 18, 2018

Copy link to clipboard

Copied

yeah i've already implemented the 180 flip of the stage so thats working fine. I've not looked at firing the orientation event myself, what can i use to do that? an ane of some form?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0
Adobe Community Professional ,
Aug 18, 2018

Copy link to clipboard

Copied

You use stage.setOrientation(); Here's an article about it:

Adobe Flash Platform * Manual orientation

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0
Participant ,
Aug 18, 2018

Copy link to clipboard

Copied

had a go, but it seems to affect stage orientation but doesn't affect the device orientation - the stage flips, but the device stays in the same orientation so the keyboard is still at the bottom - does seem to still do the animation too

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0