Smooth Resize onclick [AS-1]

Ok, this is probably pretty simple, but I have a couple of questions.

I have a movieclip that I want to be resized when a button is clicked. I want the animation to be smooth as if it had weight though. I read the tutorial on this but I need something slightly different, I would rather it where I can just refer to a function that is set in another movieclip. That way I could easily refer to it again and just set the height, width, and if possible, x, and y.

And my second question, is how to keep the border of my movieclip that is going to be resized the same thickness. I want the inside to be resized but the sides to stay the same width but move to stay on the edge.

Any help is helpful, of course.

Thanks,
Jeff:party:

Would more people respond if I gave code into my post?

try something like this on the mc u want to resize

[AS]
onClipEvent(load){
endXScale = 100
endYScale = 100
}
on(release){
endXscale=150
endYscale=150
}
onClipEvent(enterFrame){
_xscale+=(endXscale-_xscale)/10
_yscale+=(endYscale-_yscale)/10
}
[/AS]

but is there a way to fix the border from resizing as well, is there also a way to make it look something like below


onrelease {
      docoolresizeidefinedearlier (0 0 400 400 3) //0 0 being width and height, 400 and 400 both being width and height, and 3 being weight.
}


and as I meantioned earlier, what about the borders

So far works beautifully though, thanks

if u dont want the border to resize the only way is to select hairline in properties of the line

about the function
it could be like

[AS]
MovieClip.prototype.doResize = function(startW, startH, endW, endH, weight) {
this._width = startW;
this._height = startH;
this.onEnterFrame = function() {
this._width += (endW-_width)/weight;
this._height += (endH-_height)/weight;
};
};
[/AS]

im too lazy to add something to erase the onEnterframe but maybe itll work anyway

wow that was fast and did it just perfect,

Thanks so much!
Jeff

wait, now I am confused, I have multiple problems:

  1. How do I set it to only resize the object that I am working with, I used this. and it didn’t work, it resized everything.

  2. I am confused about the function of the numbers I put in. I think there are some stuff that isn’t quite right because I need it to still resize, did you take that out of the second code and change it to moving? I can’t figure out how to do it.

Thanks, Jeff

Oh, I think I know what the problem was, I mistyped something earlier, when I said the onrollover stuff, I said
"//0 0 being width and height, 400 and 400 both being width and height, and 3 being weight."

Really, I meant to say 400 and 400 both being x and y of where it slides to, thus meaining the following:

0 and 0 are the width and height at the end of the sliding, 400 and 400 are where the x and y axis are that they slide to, and 3 being the weight.

Can you do this?

Sorry for the confusion :smiley:

Thanks,
Jeff

Please somebody at least help me a bit, I don’t know anything about math, I really suck at it, I am only in seventh grade math so I don’t know how to do any of these slide effects myself.:red: :drool: