1 Flash Zoom funktion 26. September 2006, 10:28 Wie kann ich in flash eine zoom funktion schreiben ich komme da nicht weiter.Ich will in flash sprechblasen erzeugen und auch rein zoomen können. mfg shy
2 9. November 2006, 20:22 Wie jetzt ? eigentlich kannst Du Dein MovieClip nehmen, der einen Instanznamen hat und folgendes schreiben. Beispiel : Du hast auf der Hauptbühne einen MC, der als Instanznamen MC hat. dann folgendes Script in einem Frame : Quellcode _level0.MC.onRollOver = function (){ this._xscale = 150; this._yscale = 150; } _level0.MC.onRollOut = _level0.MC.onReleaseOutside = function (){ this.MC._xscale = 100; this.MC._yscale = 100; } Oder, um das auf mehrere MovieClips zu übertragen folgendes : Quellcode MovieClip.prototype.zoom = function (){ this.onRollOver = function (){ this._xscale = 150; this._yscale = 150; } this.onRollOut = this.onReleaseOutside = function (){ this.MC._xscale = 100; this.MC._yscale = 100; } } _level0.MC.zoom(); _level0.MC2.zoom(); Alles anzeigen etc.......
3 9. November 2006, 20:24 Fehlerteufel : script muss so aussehen : Quellcode MovieClip.prototype.zoom = function (){ this.onRollOver = function (){ this._xscale = 150; this._yscale = 150; } this.onRollOut = this.onReleaseOutside = function (){ this._xscale = 100; this._yscale = 100; } } _level0.MC.zoom(); _level0.MC2.zoom(); Alles anzeigen
4 oO 25. November 2006, 13:33 Das sieht aber nicht schön aus der Zoom! Vielleicht sollte man einfach ein AS-Tween machen?! Das Zoomt es es um einiges schöner.
5 25. November 2006, 13:44 Hier mal der Code für AS, und mc is wieder der MovieClip... Quellcode MovieClip.prototype.zoomIt = function(y:Number,x:Number){ this.yS = y; this.xS = x; this.onEnterFrame = function(){ //Eine OEF Funktion anlegen if(this._yscale > this.yS){ this._yscale += (this.yS-this._yscale)/10; } if(this._yscale < this.yS){ this._yscale += (this.yS-this._yscale)/10; } if(this._xscale > this.xS){ this._xscale += (this.xS-this._xscale)/10; } if(this._xscale < this.xS){ this._xscale += (this.xS-this._xscale)/10; } //Optional: if(this._yscale == this.yS && this._xscale == this.xS){ delete this.onEnterFrame; } } } //Funktion anwenden: _root.mc.zoomIt(150,150); Alles anzeigen