Possible to react to changes in orientation (landscape/portrait) on iPad?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible to react to changes in orientation (landscape/portrait) on iPad?

Joshua Harlan Lifton
Hi all,

Is there a way for haXe to react to changes between landscape and
portrait modes on the iPad? I see in the .nmml samples that there is
an orientation parameter, but I don't see any way to react to the
orientation at run time. Any ideas?

Thanks,
Josh

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Possible to react to changes in orientation (landscape/portrait) on iPad?

Tony Polinelli


does the nme.ui.Accellerometer.get().y give you a constant number - or is it relative to the motion?  if you can tell what "up" is then you can rotate the stage.



On Fri, Apr 1, 2011 at 9:50 AM, Joshua Harlan Lifton <[hidden email]> wrote:
Hi all,

Is there a way for haXe to react to changes between landscape and
portrait modes on the iPad? I see in the .nmml samples that there is
an orientation parameter, but I don't see any way to react to the
orientation at run time. Any ideas?

Thanks,
Josh

--
haXe - an open source web programming language
http://haxe.org



--
Tony Polinelli
http://touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Possible to react to changes in orientation (landscape/portrait) on iPad?

Paul Zirkle
I strongly suggest against using Accelerometer data for orientation
changes; especially on the iPad.  There is no API for telling whether
or not the "lock orientation" switch is on, meaning the only way to
know when you should flip or not is to wait for the proper events
(which simply aren't sent if the lock is enabled).

On Thu, Mar 31, 2011 at 5:16 PM, Tony Polinelli <[hidden email]> wrote:

>
>
> does the nme.ui.Accellerometer.get().y give you a constant number - or is it
> relative to the motion?  if you can tell what "up" is then you can rotate
> the stage.
>
>
>
> On Fri, Apr 1, 2011 at 9:50 AM, Joshua Harlan Lifton
> <[hidden email]> wrote:
>>
>> Hi all,
>>
>> Is there a way for haXe to react to changes between landscape and
>> portrait modes on the iPad? I see in the .nmml samples that there is
>> an orientation parameter, but I don't see any way to react to the
>> orientation at run time. Any ideas?
>>
>> Thanks,
>> Josh
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>
>
>
> --
> Tony Polinelli
> http://touchmypixel.com
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Possible to react to changes in orientation (landscape/portrait) on iPad?

Joshua Harlan Lifton
Are those events available in haXe? Does the Titanium wrapper
available via haxelib have them?

On Thu, Mar 31, 2011 at 9:40 PM, Paul Zirkle <[hidden email]> wrote:

> I strongly suggest against using Accelerometer data for orientation
> changes; especially on the iPad.  There is no API for telling whether
> or not the "lock orientation" switch is on, meaning the only way to
> know when you should flip or not is to wait for the proper events
> (which simply aren't sent if the lock is enabled).
>
> On Thu, Mar 31, 2011 at 5:16 PM, Tony Polinelli <[hidden email]> wrote:
>>
>>
>> does the nme.ui.Accellerometer.get().y give you a constant number - or is it
>> relative to the motion?  if you can tell what "up" is then you can rotate
>> the stage.
>>
>>
>>
>> On Fri, Apr 1, 2011 at 9:50 AM, Joshua Harlan Lifton
>> <[hidden email]> wrote:
>>>
>>> Hi all,
>>>
>>> Is there a way for haXe to react to changes between landscape and
>>> portrait modes on the iPad? I see in the .nmml samples that there is
>>> an orientation parameter, but I don't see any way to react to the
>>> orientation at run time. Any ideas?
>>>
>>> Thanks,
>>> Josh
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>
>>
>>
>> --
>> Tony Polinelli
>> http://touchmypixel.com
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Possible to react to changes in orientation (landscape/portrait) on iPad?

tom rhodes
I assume you're talking about cpp? 

this was why i was interested in Stage.onResizeEvent working in jeash... would be a fairly neat solution if html5. although it would still ignore the switch i spose...


On 1 April 2011 05:16, Joshua Harlan Lifton <[hidden email]> wrote:
Are those events available in haXe? Does the Titanium wrapper
available via haxelib have them?

On Thu, Mar 31, 2011 at 9:40 PM, Paul Zirkle <[hidden email]> wrote:
> I strongly suggest against using Accelerometer data for orientation
> changes; especially on the iPad.  There is no API for telling whether
> or not the "lock orientation" switch is on, meaning the only way to
> know when you should flip or not is to wait for the proper events
> (which simply aren't sent if the lock is enabled).
>
> On Thu, Mar 31, 2011 at 5:16 PM, Tony Polinelli <[hidden email]> wrote:
>>
>>
>> does the nme.ui.Accellerometer.get().y give you a constant number - or is it
>> relative to the motion?  if you can tell what "up" is then you can rotate
>> the stage.
>>
>>
>>
>> On Fri, Apr 1, 2011 at 9:50 AM, Joshua Harlan Lifton
>> <[hidden email]> wrote:
>>>
>>> Hi all,
>>>
>>> Is there a way for haXe to react to changes between landscape and
>>> portrait modes on the iPad? I see in the .nmml samples that there is
>>> an orientation parameter, but I don't see any way to react to the
>>> orientation at run time. Any ideas?
>>>
>>> Thanks,
>>> Josh
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>
>>
>>
>> --
>> Tony Polinelli
>> http://touchmypixel.com
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Possible to react to changes in orientation (landscape/portrait) on iPad?

Joshua Harlan Lifton
Yes, I'm targeting CPP.

On Fri, Apr 1, 2011 at 5:31 AM, tom rhodes <[hidden email]> wrote:

> I assume you're talking about cpp?
> this was why i was interested in Stage.onResizeEvent working in jeash...
> would be a fairly neat solution if html5. although it would still ignore the
> switch i spose...
>
>
> On 1 April 2011 05:16, Joshua Harlan Lifton <[hidden email]>
> wrote:
>>
>> Are those events available in haXe? Does the Titanium wrapper
>> available via haxelib have them?
>>
>> On Thu, Mar 31, 2011 at 9:40 PM, Paul Zirkle <[hidden email]> wrote:
>> > I strongly suggest against using Accelerometer data for orientation
>> > changes; especially on the iPad.  There is no API for telling whether
>> > or not the "lock orientation" switch is on, meaning the only way to
>> > know when you should flip or not is to wait for the proper events
>> > (which simply aren't sent if the lock is enabled).
>> >
>> > On Thu, Mar 31, 2011 at 5:16 PM, Tony Polinelli <[hidden email]>
>> > wrote:
>> >>
>> >>
>> >> does the nme.ui.Accellerometer.get().y give you a constant number - or
>> >> is it
>> >> relative to the motion?  if you can tell what "up" is then you can
>> >> rotate
>> >> the stage.
>> >>
>> >>
>> >>
>> >> On Fri, Apr 1, 2011 at 9:50 AM, Joshua Harlan Lifton
>> >> <[hidden email]> wrote:
>> >>>
>> >>> Hi all,
>> >>>
>> >>> Is there a way for haXe to react to changes between landscape and
>> >>> portrait modes on the iPad? I see in the .nmml samples that there is
>> >>> an orientation parameter, but I don't see any way to react to the
>> >>> orientation at run time. Any ideas?
>> >>>
>> >>> Thanks,
>> >>> Josh
>> >>>
>> >>> --
>> >>> haXe - an open source web programming language
>> >>> http://haxe.org
>> >>
>> >>
>> >>
>> >> --
>> >> Tony Polinelli
>> >> http://touchmypixel.com
>> >>
>> >> --
>> >> haXe - an open source web programming language
>> >> http://haxe.org
>> >>
>> >
>> > --
>> > haXe - an open source web programming language
>> > http://haxe.org
>> >
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>
>

--
haXe - an open source web programming language
http://haxe.org