_width not changing during tween. is it useless?

I was disappointed to find that I could not use the _width
property of a tweened movieclip instance to know how large
the mc is at a given time.

Am I just not getting something??

A breakpoint in the onEnterFrame() function shows that
_width is always the LARGEST width the movieclip
ever has – not its CURRENT width. In my case the mc is being
made larger and larger, using a tween made in the authoring
environment. The clip starts out tiny and ends up 400 pixels wide,
but the _width property is 400 the entire time!

What gives??

i really appreciate enlightenment!
rwelti

I think you need to show the code you are using
something like this
mc.onEnterFrame = function() {
this._width += 1;
trace(this._width);
};

gives the expected result

Hi Stringy,

I’m not trying to change the mc._width, just make a decision
based on it.

I made the tween in the authoring environment, so there is
no Actionscript to show…

A breakpoint in the onEnterFrame() function shows me that
the width of the movieclip is always 400, no matter what
frame I’m in, even though the object is getting larger on
the screen, as the tween progresses.

I am guessing that the intermediate values of the size tween
simply are not being stored in the _width property where I
expected to find them.

I’d have to give you a .fla file but to see it, just tween a circle
from width say 10 to width 100 across say 30 frames. Make
an onEnterFrame() function and put a breakpoint in it. In the
debugger, try to examine the _width property.

Cheers and thanks for reading!
Russ

Motion tween your mc on its _parent timeline rather than shape tween on its own.(otherwise _width will always be the same)

Thanks.

I found the issue: the movie clip included a mask, and the mask
was the item whose _width was being returned, since it was larger than
the circle inside of it.

Which makes a different issue. In order to get at
the circle’s _width (as a masked shape) it seems I have to make it it’s own mc.

If I do that, I can’t shape tween it, I have to motion tween it, and when
motion tweened it gets thicker as it gets larger, which is not what I want.
I tried converting lines to fills, no change. The shape tween is the one that
lets me keep the circle the same thickness, and shape tweens apparently
can’t be applied to movieclips… Aaargh!

Actually you can see the circles in action at http://www.iris.edu/swaves/EQ.html
They are the red circles. (Hit the Play button)

I have not tried tweening it in the parent’s timeframe. That’s a whole
nother basket of fish. Not sure. Anyway thanks a lot for answering!

rwelti

I think if you do the outline as hairline, you can motion tween with no increase in thickness