PDA

View Full Version : maximum height of movieclip



jerryj
October 26th, 2004, 03:44 PM
hi,
how can i actionscript the maximum height (and width) of a movieclip??

thanks!

jerry newbie

icio
October 26th, 2004, 04:37 PM
depends on how you're sizing.
but you could do something like this:

onClipEvent(load) {
maxHeight = 100;
maxWidth = 100;
}
onClipEvent(enterFrame) {
if (this._width > maxWidth) {
this._width = maxWidth;
}
if (this._height > maxHeight) {
this._height = maxHeight;
}
}

hope this helps :thumb:

jerryj
October 26th, 2004, 06:36 PM
it sure helps,

thank you scotland!

jerryj