Scaling Movie Clip Help
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Scaling Movie Clip Help

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    13

    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.

    Thanks
    Attached Files Attached Files
    Last edited by MG_Kobra; 10-23-2013 at 08:13 PM.

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    970
    Hi,

    You could use Tween, if you give the circle the instance name of Ball in this example

    PHP Code:
    import mx.transitions.*;
    import mx.transitions.easing.*;

    new 
    Tween(Ball"_x"None.easeNoneBall._x265true);
    new 
    Tween(Ball"_y"None.easeNoneBall._y135true);
    new 
    Tween(Ball"_width"None.easeNoneBall._width645true);
    new 
    Tween(Ball"_height"None.easeNoneBall._height645true); 
    and just change names for the square.

    You might want to look into something called greensock apparently you can do all the tweens in one go!!

  3. #3
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    951
    It's "Tween lite" from greensock i just downloaded it 2 days ago, for as2 and for as3
    Hi Object, Listen, i wish to return you something, but only if what you are saying is true, else, forget it, ROLL_OVER the floor, i will check for someone else at the stage, while eating a no.visible cookie.

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com