Alright i have two Movie Clips on 2 different layers…One has the instance name panel and the other has the instance name panel2.
Now, on the timeline panel is suppose to grow to 210x480 and then stop.
A few frames later panel2 is supposed to resize to 150x480 but when panel2 resizes the other MC (panel) resizes to panel2’s size…
here is the code for panel:
onClipEvent(load){
// Define initial height
_root.high = 210;
// Define initial width
_root.wide = 480;
}
onClipEvent(enterFrame){
// Panel
with(_root.panel){
// Height
if(_height > _root.high){
_height -= (_height - _root.high)/2;
} else {
_height += (_root.high - _height)/2;
}
// Width
if(_width > _root.wide){
_width -= (_width - _root.wide)/2;
} else {
_width += (_root.wide - _width)/2;
}
}
}
and here is the code for panel2:
onClipEvent(load){
// Define initial height
_root.high = 150;
// Define initial width
_root.wide = 480;
}
onClipEvent(enterFrame){
// Panel
with(_root.panel2){
// Height
if(_height > _root.high){
_height -= (_height - _root.high)/2;
} else {
_height += (_root.high - _height)/2;
}
// Width
if(_width > _root.wide){
_width -= (_width - _root.wide)/2;
} else {
_width += (_root.wide - _width)/2;
}
}
}
thanks for any help