Salve a tutti.
Ho un MC "lente" che contiene due frame.
Sul primo frame c'è una lente d'ingrandimento con segno "+";
Sul secondo frame c'è invece la lente col segno "-";
Non riesco a fare in modo che onRollover il cursore cambi da "+" a "-" e viceversa a seconda che l'mc "foto" sia zoomato o meno.
Questo è il codice dello zoom:Come risolvo?codice:myZoom = function (myDepth) { if (myDepth == "deep") { myDepth = 4; } else if (myDepth == "medium") { myDepth = 8; } else if (myDepth == "light") { myDepth = 12; } // end else if foto.onRelease = function() { if (k > 0) { return; } // end if zoom = true; dir == 1 ? (dir = -1) : (dir = 1); if (dir == 1) { pt = {x: foto._xmouse, y: foto._ymouse}; } // end if }; this.onEnterFrame = function () { if (!zoom) { return; } // end if foto._xscale = foto._xscale + dir * k * 50 / myDepth; foto._yscale = foto._yscale + dir * k * 50 / myDepth; var pt2 = {x: pt.x, y: pt.y}; foto.localToGlobal(pt2); foto._x = foto._x - (pt2.x - pt.x); foto._y = foto._y - (pt2.y - pt.y); ++k; if (k == 8) { zoom = false; k = 0; } // end if }; }; myZoom("medium");
Grazie a tutti.

Rispondi quotando