Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Zooming ListBox issue

New Here ,
Jan 16, 2017 Jan 16, 2017

Hi!

I have a android air application that has a listbox witch you can zoom with touch.

But there are an issue with that that i can't solve:

List with no zoom:

Sem_Título.png

List with zoom:

Sem_T_tulo2.png

As you can see, the first listbox cell has much height than the other ones (and the x/y coordinates are diferent).

The code to zoom the list box is that:

function onZoom(e:TransformGestureEvent):void {

  if(touchList.scaleX>0.8 && touchList.scaleX<1.5)

  {

       touchList.scaleX *= (e.scaleX+e.scaleY)/2;

       touchList.scaleY *= (e.scaleX+e.scaleY)/2;

  }

  else if (touchList.scaleX<0.8)

  {

       touchList.scaleX = 0.801;

       touchList.scaleY =touchList.scaleX;

  }

  else if (touchList.scaleX>1.5)

  {

       touchList.scaleX = 1.499;

       touchList.scaleY =touchList.scaleX;

  }

  }

How could i scale the listbox keeping an equal cell height and without changing the x,y positions?

Thank you very much

TOPICS
ActionScript
235
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 17, 2017 Jan 17, 2017

I do not see anything that changed relative to the x/y positioning, but if it is, the x/y positioning appearing differently is likely due to the x/y origin not being at the corner.  If you do not want the height to change then do not scale it, but do expect the text to look stretched if you only expand the X scale..

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 17, 2017 Jan 17, 2017
LATEST

Hi!

Thank you for the answer.

Below, you have an image of the list without a mask.

As you can see, the beginning of the list is below the beginning of the backgroun (when it should match).

I supose that the x/y origin is not at the corner but how do i change that?

Is there any other method to solve this problem?

Sem_T_tulo.png

Thank you!

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