Groups | Blog | Home
all groups > flash (macromedia) > february 2007 >

flash (macromedia) : transform movieclip question


SPGAnne
2/17/2007 5:00:23 PM
Is it possible to transform the size of a movie clip while keeping some of the
contents of the clip a fixed size? For example suppose I have a movie clip
that has a frame graphic element and then a bunch of other graphic and/or movie
clip elements inside that frame. I want to put several instances of this movie
clip on the stage, each having a different frame size, but want all the
elements inside the frame to remain the same size and position. Is this
possible?
albee
2/18/2007 6:22:37 PM
you could just transform the frame element and not any of the other elements.

first of all, make the frame element inside your movieclip a movieclip, and
then give it an instance name, like frame_mc. then put several instances of the
clip on your main timeline, and give each one an instance name (let's say you
put three instances on your main timeline and name them view1, view2, and
view3) add this code to a frame on the main timeline:
// scale the frame in view1 to 120%
view1.frame_mc._xscale = 120;
view1.frame_mc._yscale = 120;

// scale the frame in view2 to 150%
view2.frame_mc._xscale = 150;
view2.frame_mc._yscale = 150;

// scale the frame in view3 to 75%
view3.frame_mc._xscale = 75;
view3.frame_mc._yscale = 75;

all other elements in the view clips remain the same, but frame_mc grows or
shrinks according to your code...

good luck,

albee



SPGAnne
2/19/2007 12:46:36 AM
AddThis Social Bookmark Button