PDA

View Full Version : I shall now shoot myself in the face...



DigitalPimp
March 11th, 2003, 04:21 PM
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??


FLA of file (http://www.kernlearn.net/personnel/Schools.fla)

Compiled (http://www.kernlearn.net/personnel/Schools.swf)

The whole thing that I'm putting together (http://www.kernlearn.net/personnel/)

Jubba
March 11th, 2003, 04:55 PM
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...

DigitalPimp
March 11th, 2003, 05:47 PM
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;
}

}

Jubba
March 11th, 2003, 06:48 PM
1) 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.

2) 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...

DigitalPimp
March 11th, 2003, 07:51 PM
That was it thank you very much!!!!

fez
March 11th, 2003, 07:58 PM
dont shoot yourself. my best friuends dad killed himself.

Jubba
March 11th, 2003, 08:28 PM
You're welcome. :) Glad I helped..

morse
March 18th, 2003, 08:11 PM
fez- that blows