| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| FBx Registriert seit: May 2003
Beiträge: 968
| start drag mit functions-aufruf
hi, habe eine drag/release-function, die jeweils eine weitere function (_root.dragMe(this) u. _root.releaseMe(this)) aufruft. hintergrund, ist bei einem drag/release, wird der mc entsprechend skaliert. das probelm ist nur, das durch diese functions-aufrufe ,die koordinaten des actionsfeldes (startDrag(this, true, 35, 120,400, 100) nicht mehr funktoinieren.?? hier das ganze as: drag: on (press) { startDrag(this, true, 35, 120,400, 100); _root.dragMe(this); this.swapDepths (1000); } on (release) { stopDrag(); _root.releaseMe(this); //--Anfang: hitTest target01 if (this.hitTest(_root.target01.magnet)) { _root.target01.fragezeich._visible = 0; _root.hit(this); _x = _parent.target01._x; _y = _parent.target01._y; }else{ this._x = _root.mc01xpos; this._y = _root.mc01ypos; } } // Bestimmen der mc-Position onClipEvent (load) { _root.mc01xpos = this._x; _root.mc01ypos = this._y; _xscale = _root.initScale; _yscale = _root.initScale; } Functionen: //Startgrösse: Hier werden die mc´s auf den Anfangswert 30% skaliert var initScale = 30; function init() { for (i=1; i<=_root["feld0"+i]; i++) { _root["feld0"+i]._xscale = initScale; _root["feld0"+i]._yscale = initScale; } } // Function drag //Bei einem drag wird mc auf 30% skaliert function dragMe(gross) { gross._xscale = 40; gross._yscale = 40; startDrag(gross,false); } // Function release //Bei einem release, wird mc auf 30% skaliert function releaseMe (fallen){ fallen._xscale = _root.initScale; fallen._yscale = _root.initScale; } // Function hit //Erfolgt ein hit mit einem der Felder, wird mc auf 40% skaliert function hit(treffer) { treffer._xscale = 40; treffer._yscale = 40; } gruss sven |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |