PDA

View Full Version : Zooming


____
04-14-2003, 05:33 PM
I asked this question earlier in another forum but the answer didnt seem to work the way I wanted.
Im doing a zoom effect and its working, but I dont want it to go under a certain size. So here is the code I came up with to stop it. But it doesnt seem to be working. Any help would be a appreciated

First I create this variable at the root level.
Difference = (_root.panorama._width - 4307.6)
Here 4307.6 is the original width of the movie clip and difference should just return the difference of whatever the current width is minus 4307.6

And then on the actual movie clip i put this code
onClipEvent (load) {if (Difference >= 0) {_root.panorama._width = 4307.6;
_root.panorama._height = 446.0;

}
}
Here i was trying to get it to be the original width and height if the difference was less than or equal to zero. But its just not working

Any help would be really appreciated
Thanks,
Eric

zebbah
04-14-2003, 06:27 PM
I think maybe you're not targeting you're variable right.

Try using _root.Difference in your if condition.

____
04-14-2003, 06:35 PM
Just tried that, still same result.
Thanks though.
Eric

texbala
04-17-2003, 01:29 AM
do u want to use


//to zoom down
on (press) {
if (mcname._xscale >= 100) {
mcname._xscale *= 0.9;
mcname._yscale *= 0.9;
}
}