Ok, can somebody please please help me here??! Attached is a scene where when I mouseover a pic I need it to scale up. When I use just 1 image it works beautifully but if I use 2 images everything gets fubared. I am even using different variables and all. Can somebody please help me before I go kill myself??
what the hell!?!
ok, I don’t have flash on me here, but show me the code you are using and the instance names of the upper and lower image. I might be able to find something…
Exactly!
This is on the top image.
onClipEvent (load) {
_global.scaleX = 100;
_global.scaleY = 100;
speed = 2;
returnSpeed = 1;
}
onClipEvent (enterFrame) {
_xscale += (scaleX-_xscale)/speed;
_yscale += (scaleY-_yscale)/speed;
_width += (_global.scaleX-_xscale)/speed;
_height += (_global.scaleY-_yscale)/speed;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
trace(_root.checkVar1);
_global.scaleX = 200;
_global.scaleY = 200;
_root.checkVar1 = "on1";
swapDepths(ArvinExt);
}
else {
_root.checkVar1 = "off1";
}
if (_root.checkVar1 == "off1") {
_global.scaleX = 100;
_global.scaleY = 100;
}
}
This is on the lower image
onClipEvent (load) {
_global.scaleX = 100;
_global.scaleY = 100;
speed = 2;
returnSpeed = 1;
}
onClipEvent (enterFrame) {
_xscale += (scaleX-_xscale)/speed;
_yscale += (scaleY-_yscale)/speed;
_width += (_global.scaleX-_xscale)/speed;
_height += (_global.scaleY-_yscale)/speed;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
trace(_root.checkVar2);
_global.scaleX = 200;
_global.scaleY = 200;
_root.checkVar2 = "on2";
swapDepths(ArvinInt);
}
else {
_root.checkVar2 = "off2";
}
if (_root.checkVar2 == "off2") {
_global.scaleX = 100;
_global.scaleY = 100;
}
}
-
remove the _global There is no point to that and you are confusing the flash movie by having that there. They are counter-acting eachother.
-
Place “this” in front of your properties. (EXAMPLE: change “_height” to “this._height”
Do that on both movieclips to all the properties and it should work ok. I really think that its just those global variables that are confusing the hell out of your movie because you are setting them twice as two different things and both movieclips are calling the same varialbe…
That was it thank you very much!!!
dont shoot yourself. my best friuends dad killed himself.
You’re welcome. Glad I helped…
fez- that blows