flow14
June 24th, 2003, 05:08 PM
I having a problem with a function that resizes movie clips.
I want the function to resize the clips individually (on rollover), but on the first rollover, the targeted clip behaves normally and all the other clips disappear.
Here's an illustration:
http://www.flow14.com/FunctionHelp/index.html
Here's the code I'm using--
In the first frame at _root:
_root.press = false;
function jumbo (whichClip, Size) {
xsize = Size - _root[whichClip]._xscale;
speed += xsize / 3;
speed *= .5;
_root[whichClip]._xscale += speed;
ysize = Size - _root[whichClip]._yscale;
speed += ysize / 3;
speed *= .5;
_root[whichClip]._yscale += speed;
}
Actions assigned to the button(s):
on (rollOver) {
_root.catW.targetSize = 100;
_root.press = true;
}
on (rollOut) {
_root.catW.targetSize = 5;
_root.press = true;
}
Actions assigned to the targeted clips:
onClipEvent (enterFrame) {
if (_root.press == true) {
// The next line calls the Function in frame 1
_root.jumbo(_root.catW.targetSize, this._name);
}
}
I would be happy to send the source file to anyone who can help.
I want the function to resize the clips individually (on rollover), but on the first rollover, the targeted clip behaves normally and all the other clips disappear.
Here's an illustration:
http://www.flow14.com/FunctionHelp/index.html
Here's the code I'm using--
In the first frame at _root:
_root.press = false;
function jumbo (whichClip, Size) {
xsize = Size - _root[whichClip]._xscale;
speed += xsize / 3;
speed *= .5;
_root[whichClip]._xscale += speed;
ysize = Size - _root[whichClip]._yscale;
speed += ysize / 3;
speed *= .5;
_root[whichClip]._yscale += speed;
}
Actions assigned to the button(s):
on (rollOver) {
_root.catW.targetSize = 100;
_root.press = true;
}
on (rollOut) {
_root.catW.targetSize = 5;
_root.press = true;
}
Actions assigned to the targeted clips:
onClipEvent (enterFrame) {
if (_root.press == true) {
// The next line calls the Function in frame 1
_root.jumbo(_root.catW.targetSize, this._name);
}
}
I would be happy to send the source file to anyone who can help.