PDA

View Full Version : n00b - resizing a movie clip w/ actionscript


jmb_grafix
09-06-2006, 01:58 PM
For example, how would I make a 50 x 50 circle that is a movie clip, grow to a circle that is 200 x 200? With the center of the circle staying in the same place (so the circle does not move, just grows).

How do I do this with actionscript 2.0? I'm useing Flash 8.

In addition to that, how would I do it over a certain period of time? I really need to learn how to do this with actionscript because I'm making an animation of circles that grow and loop, grow and loop, etc. By doing it with keyframe animation, I can't get the timeing right and I'm ending up with 50+ layers that I have to work with. And it's also really choppy @ 24 fps.

<a href="http://www.xbox.com/en-US/default.htm">here</a> is a good example of what I am trying to accomplish.

Thanks in advance

J

Hibba
09-08-2006, 02:15 AM
For the growing, check out simple tutorials.
<http://www.actionscript.org/tutorials/beginner/set_property/index.shtml>
As far as the animation, I don't do a lot with that, but some type of animation tween should do the trick, you can look at the tutorials to help you there as well.

outlando
10-03-2006, 03:18 PM
Make sure the registration point of the movieClip is central. Then do this:


circle_mc.onEnterFrame = function():Void {
circle_mc._xscale++;
circle_mc._yscale++;
if (circle_mc._xscale>399) {
delete this.onEnterFrame;
circle_mc._xscale = 400;
circle_mc._yscale = 400;
}
};

icktoofay
10-05-2006, 05:44 AM
1. what in that flash content of the xbox webpage
2. u can use _width and _height properaties