Scaling Movie Clip Help
I know how to scale movie clips and graphics on the stage by using motion tween. What I am wanting to know is how to do this using action script. What I am wanting is for the graphics to get bigger or smaller based on where they are on the stage.
I have attached a FLA called "scale_demo" to this post. There is a blue circle and a red square that start down at the bottom and go up to the top as they clip plays. They start out big, but as they go up the stage they get smaller based on how many meters they have moved. As I said before I know how to do this using motion tween, but I prefer to have it done using action script.
If someone could help, it would be very much appreciated.
Last edited by MG_Kobra; 10-23-2013 at 08:13 PM.
You could use Tween, if you give the circle the instance name of Ball in this example
and just change names for the square.
new Tween(Ball, "_x", None.easeNone, Ball._x, 26, 5, true);
new Tween(Ball, "_y", None.easeNone, Ball._y, 13, 5, true);
new Tween(Ball, "_width", None.easeNone, Ball._width, 64, 5, true);
new Tween(Ball, "_height", None.easeNone, Ball._height, 64, 5, true);
You might want to look into something called greensock apparently you can do all the tweens in one go!!
Designer, Programmer, Musician
You should get into coding. It's not hard. It's like reading and writing. Everybody can learn to read and write. It's what you write that's hard, not the ability to write.
Take a beginner class on programming - general programming - that teaches you the programming basics. With basic programming skills, you can figure out how to control a clip in actionscript, set up a login in php, or whatever that uses programming or scripting because you know basic programming.
Click Here to Expand Forum to Full Width
Poll by Flashkit.com