2 Replies - 4671 Views - Last Post: 05 September 2013 - 07:40 AM

#1 NitinJotwani  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 28-September 12

scaling using movieclip transformation matrices

Posted 02 August 2013 - 09:47 PM

import flash.geom.Matrix;
var my_matrix=myClip.transform.matrix;

btn_default.addEventListener(MouseEvent.CLICK,f_btn_click);

x_scale.addEventListener(Event.CHANGE,f_x_scale);
y_scale.addEventListener(Event.CHANGE,f_y_scale);

x_trans.addEventListener(Event.CHANGE,f_x_trans);
y_trans.addEventListener(Event.CHANGE,f_y_trans);

function f_btn_click(evt:MouseEvent)
{
	my_matrix.identity();
	myClip.transform.matrix=my_matrix;
}
function f_x_scale(evt:Event)
{
	my_matrix.scale(x_scale.value,1)
	myClip.transform.matrix=my_matrix
}
function f_y_scale(evt:Event)
{
	my_matrix.scale(1,y_scale.value)
	myClip.transform.matrix=my_matrix
}
function f_x_trans(evt:Event)
{
	my_matrix.translate(x_trans.value,0)
	myClip.transform.matrix=my_matrix
}
function f_y_trans(evt:Event)
{
	my_matrix.translate(0,y_trans.value)
	myClip.transform.matrix=my_matrix
}


no doubt, scaling works fine, but i want scaling to be done at same x,y position of object...as u see in my swf while scaling it also translates the object, which i didnt need, how can i overcome??

refer, My SWF file

Is This A Good Question/Topic? 0
  • +

Replies To: scaling using movieclip transformation matrices

#2 NitinJotwani  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 28-September 12

Re: scaling using movieclip transformation matrices

Posted 02 August 2013 - 10:21 PM

want to acheive like this one,
ToDo
Was This Post Helpful? 0
  • +
  • -

#3 acstiswt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-September 13

Re: scaling using movieclip transformation matrices

Posted 05 September 2013 - 07:40 AM

Hello. And Bye.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1