Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 28-08-2003, 09:42   #1 (permalink)
Neuer User
 
Registriert seit: Jul 2001
Beiträge: 40
Question zoom like map24.de

zoom wie map 24.de
hallo.

ich habe eine landkarte auf der man koordinaten bestimmen soll

auf dem setztwerkzeug (für einen punkt) steht:


on (press, rollOver) {
gotoAndStop(1);
startDrag("/thing", true, 400, 400, 20, 20);
}
on (release) {
xdistance = getProperty("../thing", _x)-x;
ydistance = getProperty("../thing", _y)-y;
_level0:txtx = xdistance;
_level0:txty = ydistance;
_level0posx = xdistance;
_level0posy = ydistance;
stopDrag();
}


wenn ich die karte zoome dann werden andere koordinaten in die datenbank geschrieben als bei 100%

wie kann ich den zoom berechnen, so wie bei map24.de

oder gibt es alternativen??


__________________
:((thanx4helpingMe)))::
__________________
::(((thanx4helpingMe)))::

Geändert von martain:: (28-08-2003 um 10:54 Uhr)
martain:: ist offline   Mit Zitat antworten
Alt 28-08-2003, 10:55   #2 (permalink)
Neuer User
 
Registriert seit: Jul 2001
Beiträge: 40
die zoombeispiele im forum haben mir nicht helfen können, oder habe ich etwas übersehen??
__________________
::(((thanx4helpingMe)))::
martain:: ist offline   Mit Zitat antworten
Alt 28-08-2003, 12:28   #3 (permalink)
Neuer User
 
Registriert seit: Dec 2002
Ort: mars
Beiträge: 90
hi,
vielleicht hilft dir das weiter
ActionScript:
  1. function makke(targ, b, h) {
  2.     var orte = 10, teil = 360/orte, ort_b = 5, ort_h = 5, mc, c, s, p;
  3.     with (Math) {
  4.         c = cos;
  5.         s = sin;
  6.         p = PI/180*teil;
  7.     }
  8.     tellTarget (targ) {
  9.         dx = dy=250;
  10.         zx = zy=100;
  11.         lineStyle(0, 0xff0000, 100);
  12.         moveTo(-b, -h);
  13.         beginFill(0x00ff00, 50);
  14.         lineTo(b, -h);
  15.         lineTo(b, h);
  16.         lineTo(-b, h);
  17.         lineTo(-b, -h);
  18.         endFill();
  19.         for (var i = 0; i<orte; i++) {
  20.             var mc = createEmptyMovieClip("orte" add i, i+1);
  21.             tellTarget (mc) {
  22.                 lineStyle(0, 0x888888, 100);
  23.                 beginFill(0x333333, 100);
  24.                 moveTo(-ort_b, -ort_h);
  25.                 lineTo(ort_b, -ort_h);
  26.                 lineTo(ort_b, ort_h);
  27.                 lineTo(-ort_b, ort_h);
  28.                 lineTo(-ort_b, -ort_h);
  29.                 endFill();
  30.                 _x = c(i*p)*100;
  31.                 _y = s(i*p)*100;
  32.                 onRelease = function () {
  33.                     targ.zx = targ.zy=50+random(100);
  34.                     targ.dx = this._x*targ.zx/100*-1+250;
  35.                     targ.dy = this._y*targ.zy/100*-1+250;
  36.                 };
  37.             }
  38.         }
  39.         _x = _y=250;
  40.         onEnterFrame = function () {
  41.             tellTarget (this) {
  42.                 _x += (dx-_x)/10;
  43.                 _y += (dy-_y)/10;
  44.                 _xscale += (zx-_xscale)/10;
  45.                 _yscale += (zy-_yscale)/10;
  46.             }
  47.         };
  48.     }
  49. }
  50. mc = createEmptyMovieClip("karte", 1);
  51. breit = hoch=250;
  52. makke(mc, breit/2, hoch/2);

hikkywhiskkid
whiskeycola ist offline   Mit Zitat antworten
Alt 28-08-2003, 13:06   #4 (permalink)
Neuer User
 
Registriert seit: Jul 2001
Beiträge: 40
danke erstmal, was aber wenn die punkte aus einer datenbank geladen werden, die haben die bezeichnung
xpos+i
ypos+i
id+i
__________________
::(((thanx4helpingMe)))::
martain:: ist offline   Mit Zitat antworten
Alt 28-08-2003, 13:10   #5 (permalink)
Neuer User
 
Registriert seit: Jul 2001
Beiträge: 40
ist da nicht zuviel flash5actionscript mit drin???
kannst du tellTarget in MX programmieren?
__________________
::(((thanx4helpingMe)))::
martain:: ist offline   Mit Zitat antworten
Alt 28-08-2003, 13:20   #6 (permalink)
Neuer User
 
Registriert seit: Dec 2002
Ort: mars
Beiträge: 90
hi,
du musst nur eine kleine änderung vornehmen. ein beispiel:
ActionScript:
  1. xpos1 = 10;
  2. ypos1 = 50;
  3. xpos2 = 50;
  4. ypos2 = 100;
  5. xpos3 = 80;
  6. ypos3 = 10;
  7. totali = 3;
  8. function makke(targ, b, h) {
  9.     var ort_b = 5, ort_h = 5, mc;
  10.     tellTarget (targ) {
  11.         dx = dy=250;
  12.         zx = zy=100;
  13.         lineStyle(0, 0xff0000, 100);
  14.         moveTo(-b, -h);
  15.         beginFill(0x00ff00, 50);
  16.         lineTo(b, -h);
  17.         lineTo(b, h);
  18.         lineTo(-b, h);
  19.         lineTo(-b, -h);
  20.         endFill();
  21.         for (var i = 1; i<=_root.totali; i++) {
  22.             var mc = createEmptyMovieClip("orte" add i, i);
  23.             tellTarget (mc) {
  24.                 lineStyle(0, 0x888888, 100);
  25.                 beginFill(0x333333, 100);
  26.                 moveTo(-ort_b, -ort_h);
  27.                 lineTo(ort_b, -ort_h);
  28.                 lineTo(ort_b, ort_h);
  29.                 lineTo(-ort_b, ort_h);
  30.                 lineTo(-ort_b, -ort_h);
  31.                 endFill();
  32.                 _x = _root["xpos"+i];
  33.                 _y = _root["ypos"+i];
  34.                 onRelease = function () {
  35.                     targ.zx = targ.zy=50+random(100);
  36.                     targ.dx = this._x*targ.zx/100*-1+250;
  37.                     targ.dy = this._y*targ.zy/100*-1+250;
  38.                 };
  39.             }
  40.         }
  41.         _x = _y=250;
  42.         onEnterFrame = function () {
  43.             tellTarget (this) {
  44.                 _x += (dx-_x)/10;
  45.                 _y += (dy-_y)/10;
  46.                 _xscale += (zx-_xscale)/10;
  47.                 _yscale += (zy-_yscale)/10;
  48.             }
  49.         };
  50.     }
  51. }
  52. mc = createEmptyMovieClip("karte", 1);
  53. breit = hoch=250;
  54. makke(mc, breit/2, hoch/2);

hickswhisk
whiskeycola ist offline   Mit Zitat antworten
Alt 01-09-2003, 07:46   #7 (permalink)
Neuer User
 
Registriert seit: Jul 2001
Beiträge: 40
sorry...

...hilft mir gar nicht weiter, die punkte sind ja noch nicht gesetzt, sie sollen ja noch gesetzt werden - also benötige ich ein extra zoomwergzeug mit dem ich an einem bestimmten ort zoomen kann und dann meine koordinaten setze.

trotzdem vielen dank, für die bemühung
__________________
::(((thanx4helpingMe)))::
martain:: ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 15:40 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele