Help I have a small flash movie, with an image that when you click on the image it zooms in. i’ve used the code;
[INDENT]code: myZoom = [COLOR=blue]function[/COLOR] (myDepth) {
[COLOR=blue]if[/COLOR] (myDepth == [COLOR=maroon]"deep"[/COLOR]) {
myDepth = [COLOR=maroon]4[/COLOR];
} [COLOR=blue]else[/COLOR] [COLOR=blue]if[/COLOR] (myDepth == [COLOR=maroon]"medium"[/COLOR]) {
myDepth = [COLOR=maroon]8[/COLOR];
} [COLOR=blue]else[/COLOR] [COLOR=blue]if[/COLOR] (myDepth == [COLOR=maroon]"light"[/COLOR]) {
[COLOR=green]// default[/COLOR]
myDepth = [COLOR=maroon]12[/COLOR];
}
trace(myDepth);
_root.onMouseDown = [COLOR=blue]function[/COLOR]() {
[COLOR=blue]if[/COLOR] (k>[COLOR=maroon]0[/COLOR]) {
[COLOR=blue]return[/COLOR];
}
zoom = [COLOR=blue]true[/COLOR];
dir == [COLOR=maroon]1[/COLOR] ? (dir=-[COLOR=maroon]1[/COLOR]) : (dir=[COLOR=maroon]1[/COLOR]);
[COLOR=blue]if[/COLOR] (dir == [COLOR=maroon]1[/COLOR]) {
pt = {x:_root._xmouse, y:_root._ymouse};
}
};
[COLOR=blue]this[/COLOR].onEnterFrame = [COLOR=blue]function[/COLOR]() {
[COLOR=blue]if[/COLOR] (!zoom) {
[COLOR=blue]return[/COLOR];
}
_root._xscale += dir*k*[COLOR=maroon]50[/COLOR]/myDepth;
_root._yscale += dir*k*[COLOR=maroon]50[/COLOR]/myDepth;
[COLOR=blue]var[/COLOR] pt2 = {x: pt.x, y: pt.y};
_root.localToGlobal(pt2);
_root._x -= (pt2.x-pt.x);
_root._y -= (pt2.y-pt.y);
k++;
[COLOR=blue]if[/COLOR] (k == [COLOR=maroon]8[/COLOR]) {
zoom = [COLOR=blue]false[/COLOR];
k = [COLOR=maroon]0[/COLOR];
}
};
};
myZoom([COLOR=maroon]“medium”[/COLOR]);
[/INDENT]
this works fine, however when I add a preloader in scene 1 and add a stop(); action where my image is other wise keeps replaying scene 1. When I test the movie now it does not work at all (can’t zoom anymore) also am getting an output of 8 ???
Sorry this is such a long post, any ideas would be greatly appreciated!!