T
T
Tanyel2018-07-23 16:07:02
Geometry
Tanyel, 2018-07-23 16:07:02

How to get the true dimensions of a rectangle?

5b55d1bc771a3287278680.jpeg
There is a movie clip which, for example, is 100 by 100.
I change it and rotate it as I like.
But at

obj.width = // выдает размеры прямоугольника, определяющего границу объекта отображения.

if i apply
obj.getRect(obj) = // выдает изначальные размеры тобишь 100

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tanyel, 2018-07-23
@Tanyel

there is a variant to do something like:

var ndeg = obj.rotation;
obj.rotation = 0
var razmery = obj.getRect(this);
obj.rotation = ndeg;

but these are some crutches.

A
Alexander Flasher, 2018-07-24
@alexvoz

something like:

var w: Number = obj.getRect(obj).width * obj.scaleX

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question