Re: [flexcoders] Flex Mobile Android 4 (ICS)

2012-07-03 Thread Nick Collins
 actually listen for a RESIZE event on the view, then check if the width of
the view is greater than the height. If it is, landscape, if not, portrait.

On Fri, Jun 22, 2012 at 2:56 PM, Jake Churchill reyna...@gmail.com wrote:

 **


 I got my hands on an android 3 tablet and the same thing happens there.  I
 was also able to test on an android 2.3 phone and it does not happen there.
  So, anything in android 3 or 4 and orientation changes that I should be
 aware of?

 Thanks!

 -Jake


 On Fri, Jun 22, 2012 at 12:21 PM, Jake Churchill reyna...@gmail.comwrote:

 One other thing I tried.  If I stop the autoOrient and manually flip my
 orientation via code, the same thing happens.  Usually when an app stops in
 debug mode you get the [Unload SWF] trace line but I'm not getting that so
 it makes me think it's just suspending it?

 This is super frustrating though.

 -Jake


 On Fri, Jun 22, 2012 at 11:33 AM, Jake Churchill reyna...@gmail.comwrote:

 Let's compare really quick... I'm just listening for the
 orientationChange event and switching states in my view accordingly.  (Code
 below)  Is that basically how you handle it as well or are you doing
 something different?

 I'm adding this event listener:

 stage.addEventListener( StageOrientationEvent.ORIENTATION_CHANGE,
 handleOrientationChange );

 and here's the handler:

 private function handleOrientationChange(
 event:StageOrientationEvent=null ):void
 {
 if( stage )
  {
 if( stage.orientation == rotatedLeft || stage.orientation ==
 rotatedRight )
  currentState = landscape;
 else
 currentState = portrait;
  this.invalidateDisplayList();
 }
  }


 -Jake


 On Fri, Jun 22, 2012 at 10:06 AM, Nick Collins ndcoll...@gmail.comwrote:

 **


 I have been doing active development with Flex 4.6 on my HTC Inspire 4G
 (running IceColdSandwich/Android 4.0.4) with no such problems. The only
 problem I have had is that Flash Builder doesn't always see the device as
 still being in debugging mode, even though the device indicates that it is.
 Solved by simply disconnecting the USB cable, then reconnecting it.

 I have also been developing on my ASUS Transformer Prime tablet running
 ICS with no orientation issues.

 Nick


 On Thu, Jun 21, 2012 at 5:22 PM, Jake Churchill reyna...@gmail.comwrote:

 **


 I'm in the middle of writing a flex mobile app and when I debug in the
 emulator it's fine but on my phone (Verizon Google Nexus) when I rotate to
 landscape it dies.  If I start up in landscape, it's fine until I switch 
 to
 portrait, then it dies.  In either case, there is no error in the debug
 console.  I'm using autoOrientstrue/autoOrients which.

 I don't have an iPhone so I haven't been able to test there yet but
 I'm curious if anyone else has seen this.  I've written other mobile apps
 when I had a Galaxy S 1 and I had no issues there.  Is there something 
 else
 I need to do for ICS or is this a bug?

 Thanks!

 -Jake





  



Re: [flexcoders] Flex Mobile Android 4 (ICS)

2012-07-03 Thread Nick Collins
protected function view_resizeHandler(event:ResizeEvent):void

 {

  if (widthheight)

  this.currentState=landscape;

  else this.currentState=portrait;

 }

On Tue, Jul 3, 2012 at 6:11 AM, Nick Collins ndcoll...@gmail.com wrote:

  actually listen for a RESIZE event on the view, then check if the width
 of the view is greater than the height. If it is, landscape, if not,
 portrait.


 On Fri, Jun 22, 2012 at 2:56 PM, Jake Churchill reyna...@gmail.comwrote:

 **


 I got my hands on an android 3 tablet and the same thing happens there.
  I was also able to test on an android 2.3 phone and it does not happen
 there.  So, anything in android 3 or 4 and orientation changes that I
 should be aware of?

 Thanks!

 -Jake


 On Fri, Jun 22, 2012 at 12:21 PM, Jake Churchill reyna...@gmail.comwrote:

 One other thing I tried.  If I stop the autoOrient and manually flip my
 orientation via code, the same thing happens.  Usually when an app stops in
 debug mode you get the [Unload SWF] trace line but I'm not getting that so
 it makes me think it's just suspending it?

 This is super frustrating though.

 -Jake


 On Fri, Jun 22, 2012 at 11:33 AM, Jake Churchill reyna...@gmail.comwrote:

 Let's compare really quick... I'm just listening for the
 orientationChange event and switching states in my view accordingly.  (Code
 below)  Is that basically how you handle it as well or are you doing
 something different?

 I'm adding this event listener:

 stage.addEventListener( StageOrientationEvent.ORIENTATION_CHANGE,
 handleOrientationChange );

 and here's the handler:

 private function handleOrientationChange(
 event:StageOrientationEvent=null ):void
 {
 if( stage )
  {
 if( stage.orientation == rotatedLeft || stage.orientation ==
 rotatedRight )
  currentState = landscape;
 else
 currentState = portrait;
  this.invalidateDisplayList();
 }
  }


 -Jake


 On Fri, Jun 22, 2012 at 10:06 AM, Nick Collins ndcoll...@gmail.comwrote:

 **


 I have been doing active development with Flex 4.6 on my HTC Inspire
 4G (running IceColdSandwich/Android 4.0.4) with no such problems. The only
 problem I have had is that Flash Builder doesn't always see the device as
 still being in debugging mode, even though the device indicates that it 
 is.
 Solved by simply disconnecting the USB cable, then reconnecting it.

 I have also been developing on my ASUS Transformer Prime tablet
 running ICS with no orientation issues.

 Nick


 On Thu, Jun 21, 2012 at 5:22 PM, Jake Churchill reyna...@gmail.comwrote:

 **


 I'm in the middle of writing a flex mobile app and when I debug in
 the emulator it's fine but on my phone (Verizon Google Nexus) when I 
 rotate
 to landscape it dies.  If I start up in landscape, it's fine until I 
 switch
 to portrait, then it dies.  In either case, there is no error in the 
 debug
 console.  I'm using autoOrientstrue/autoOrients which.

 I don't have an iPhone so I haven't been able to test there yet but
 I'm curious if anyone else has seen this.  I've written other mobile apps
 when I had a Galaxy S 1 and I had no issues there.  Is there something 
 else
 I need to do for ICS or is this a bug?

 Thanks!

 -Jake





  





Re: [flexcoders] Flex Mobile Android 4 (ICS)

2012-07-03 Thread Jake Churchill
I found out what was happening.  I had a global deactivate handler (I don't
want this particular app running in the background).  Apparently, this gets
called by Android when switching orientation.  The whole app de-activates,
then re-activates in a new orientation.  So, handling that, fixed my
app disappearing issue.  It was disappearing because I was killing it :)

Thanks for talking this through.

-Jake

On Tue, Jul 3, 2012 at 6:11 AM, Nick Collins ndcoll...@gmail.com wrote:

 **


 protected function view_resizeHandler(event:ResizeEvent):void

  {

   if (widthheight)

   this.currentState=landscape;

   else this.currentState=portrait;

  }

 On Tue, Jul 3, 2012 at 6:11 AM, Nick Collins ndcoll...@gmail.com wrote:

  actually listen for a RESIZE event on the view, then check if the width
 of the view is greater than the height. If it is, landscape, if not,
 portrait.


 On Fri, Jun 22, 2012 at 2:56 PM, Jake Churchill reyna...@gmail.comwrote:

 **


 I got my hands on an android 3 tablet and the same thing happens there.
  I was also able to test on an android 2.3 phone and it does not happen
 there.  So, anything in android 3 or 4 and orientation changes that I
 should be aware of?

 Thanks!

 -Jake


 On Fri, Jun 22, 2012 at 12:21 PM, Jake Churchill reyna...@gmail.comwrote:

 One other thing I tried.  If I stop the autoOrient and manually flip my
 orientation via code, the same thing happens.  Usually when an app stops in
 debug mode you get the [Unload SWF] trace line but I'm not getting that so
 it makes me think it's just suspending it?

 This is super frustrating though.

 -Jake


 On Fri, Jun 22, 2012 at 11:33 AM, Jake Churchill reyna...@gmail.comwrote:

 Let's compare really quick... I'm just listening for the
 orientationChange event and switching states in my view accordingly.  
 (Code
 below)  Is that basically how you handle it as well or are you doing
 something different?

 I'm adding this event listener:

 stage.addEventListener( StageOrientationEvent.ORIENTATION_CHANGE,
 handleOrientationChange );

 and here's the handler:

 private function handleOrientationChange(
 event:StageOrientationEvent=null ):void
 {
 if( stage )
  {
 if( stage.orientation == rotatedLeft || stage.orientation ==
 rotatedRight )
  currentState = landscape;
 else
 currentState = portrait;
  this.invalidateDisplayList();
 }
  }


 -Jake


 On Fri, Jun 22, 2012 at 10:06 AM, Nick Collins ndcoll...@gmail.comwrote:

 **


 I have been doing active development with Flex 4.6 on my HTC Inspire
 4G (running IceColdSandwich/Android 4.0.4) with no such problems. The 
 only
 problem I have had is that Flash Builder doesn't always see the device as
 still being in debugging mode, even though the device indicates that it 
 is.
 Solved by simply disconnecting the USB cable, then reconnecting it.

 I have also been developing on my ASUS Transformer Prime tablet
 running ICS with no orientation issues.

 Nick


 On Thu, Jun 21, 2012 at 5:22 PM, Jake Churchill 
 reyna...@gmail.comwrote:

 **


 I'm in the middle of writing a flex mobile app and when I debug in
 the emulator it's fine but on my phone (Verizon Google Nexus) when I 
 rotate
 to landscape it dies.  If I start up in landscape, it's fine until I 
 switch
 to portrait, then it dies.  In either case, there is no error in the 
 debug
 console.  I'm using autoOrientstrue/autoOrients which.

 I don't have an iPhone so I haven't been able to test there yet but
 I'm curious if anyone else has seen this.  I've written other mobile 
 apps
 when I had a Galaxy S 1 and I had no issues there.  Is there something 
 else
 I need to do for ICS or is this a bug?

 Thanks!

 -Jake







  



Re: [flexcoders] MouseEvent over chart [1 Attachment]

2012-07-03 Thread Jake Churchill
Alex,

I think I have figured out what is causing the mouse disruption.  I have a
background element where I display the symbol and the symbol description.
 Whenever I rollover that, it makes the mouse event's position freak out.
 If I set mouseChildren=false on the background elements, it fixes the
problem.  If I add mouseChildren=false to the chart, disables my mouse
hover events on the annotation which I can't have.

In my opinion, this is still a bug.  I do not see why elements in the
backgroundElements property would have mouse events on them in the first
place.  Let me know if you want me to file a bug.  I have a sample project
put together to illustrate this.

Also, could you please tell me why I can't add children directly to the
CartesianDataCanvas?  It seems like that's where drawing should go.

Please let me know about filing a bug for the background elements issue I
described above.  I attached my flex project file to this email in case you
are interested in seeing what I'm seeing.  The app loads with a chart and
one line and a background element.  Click anywhere to start drawing, click
again to complete the line.  Grab one end of the line and mouse down and
move it around.  When you run over the background element, it goes crazy.

Thanks!

-Jake

On Fri, Jun 29, 2012 at 12:49 PM, Jake Churchill reyna...@gmail.com wrote:

 I'm using a microsoft wireless mouse on my windows machine and the
 built-in touchpad mouse on the macbook pro.

 I'll throw together a quick test app for comparison.  If the problem still
 exists in the test app, I'll package it up as an FXP and AIR file and
 submit both with a bug report.

 Thanks!

 -Jake


 On Fri, Jun 29, 2012 at 12:47 PM, Alex Harui aha...@adobe.com wrote:

 **


 Even if the target changed, the stageY should be continously increasing
 or decreasing.

 What kind of mouse are you using?  Do you have the same one for both
 computers?

 I would try a real simple test app that just reports coordinates and see
 if has the same problem.  If it does, that would be the test case to file
 with a bug report.

 -Alex


 On 6/29/12 7:47 AM, Jake Churchill reyna...@gmail.com wrote:






 Alex,

 I ended up commenting out any code that checks against previous mouse
 events y coordinates and compiled a new AIR file.  I tested on my windows
 desktop as well as my macbook pro and I get the same result on both.  If I
 move too quickly down, the y coordinates flip up top, then back down like
 what I showed you in my traces.  Of course, with a compiled version, I
 can't stop execution to double check to see if the target is still the same
 but I assume that wouldn't change between a debug and release compile.

 Any other ideas?  Should I file a bug for this?

 Thanks!

 -Jake

 On Fri, Jun 29, 2012 at 1:38 AM, Alex Harui aha...@adobe.com wrote:






 It is up to you.  It would be annoying to code up  a workaround when it
 is just some device or driver on your computer.




 On 6/28/12 4:04 PM, Jake Churchill reyna...@gmail.com 
 http://reyna...@gmail.com  wrote:






 This is an air app, so it's happening in adl.  I can remove some checks
 and compile a final release and test if you want.

 - Sent from my Google Nexus -

 On Jun 28, 2012 5:15 PM, Alex Harui aha...@adobe.com 
 http://aha...@adobe.com  wrote:






 Sorry, didn’t notice the StageY was changing as well.  Does this happen
 on other machines, browsers, etc?


 On 6/28/12 2:21 PM, Jake Churchill reyna...@gmail.com 
 http://reyna...@gmail.com  http://reyna...@gmail.com  wrote:






 No, it always stays the same.  Here's what I have, a custom annotation
 called DrawingAnnotation which handles clicking, lines, etc.  When a line
 is added it's drawn on the chart, but all references are stored in the
 annotation.  For some reason I can't draw directly on the annotation.

 Anyway, the line has mouse events on it as well which allow it to be
 moved and selected and stuff.  When the line receives mouse down, I add an
 event listener for mouse move to the system manager:

 systemManager.addEventListener( MouseEvent.MOUSE_MOVE, mouseMoveHandler );

 which is where I am tracking the positions and stuff.  I've added the the
 listener to the line itselt, the annotation canvas, etc.  Always the same
 result.  It always happens if I move the mouse too fast vertically.

 So, my workaround is to basically check the last mouse event against the
 current and if the y changes by more than 100 pixes, I count it an outlier
 and don't count that event.  I'm sure there's a better workaround, but I'm
 not sure since I pretty much have to rely on the position given to me in
 the mouseEvent.

 Thanks!

 -Jake

 On Thu, Jun 28, 2012 at 1:34 PM, Alex Harui aha...@adobe.com 
 http://aha...@adobe.com  http://aha...@adobe.com  wrote:






 Print the target as well.  The target is likely changing and thus, the
 coordinates local to that target.




 On 6/28/12 10:11 AM, Jake Churchill reyna...@gmail.com 
 http://reyna...@gmail.com