{lang: 'de'}
Flashhilfe.de - Flash Community

kartennavigation begrenzen mit koordinaten [Flash 10]

 


AntwortenRegistrieren Seite1  

froschkoenig712#1
Benutzerbild von froschkoenig712
Beiträge: 14
Registriert: Aug 2010

30.08.2010, 21:22

Wie kann ich hier am besten ganz einfach meine Karte auslesen und begrenzen ohne mich zu verzetteln?

sprich x y und den zoom müsste man min max und min bestimmen.

hoch und runter geht es mit der begrenzung.
Nur leider geht links und rechts nix......

bin heut blöd.

die karte ist breit 1400 x und hoch 920.
sie liegt aber im movieclip zentriert da sonst die zoom funktion nicht richtig geht.



ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//Navigationschalter

up_btn.onPress = function () {
  karte.onEnterFrame = function() {
  this._y += 4;
  if (karte._y > 500){
     karte._y = 500;
  }
  }
}

up_btn.onRelease = function () {
  delete karte.onEnterFrame;
}

down_btn.onPress = function () {
  karte.onEnterFrame = function() {
  this._y -= 4;{
  if (karte._y < 0){
     karte._y = 0;
  }
  }
  }
}

down_btn.onRelease = function () {
  delete karte.onEnterFrame;
}

left_btn.onPress = function () {
  karte.onEnterFrame = function() {
  this._x -= 4;{
     if (karte._x < 100){
     karte._x = 100;
     }
  }
  }
}

left_btn.onRelease = function () {
  delete karte.onEnterFrame;
}

right_btn.onPress = function () {
  karte.onEnterFrame = function() {
  this._x += 4;
 
  }
}

right_btn.onRelease = function () {
  delete karte.onEnterFrame;
}

zoommax.onPress = function () {
  karte.onEnterFrame = function() {
  this._xscale += 4;
  this._yscale += 4;
  }
}

zoommax.onRelease = function () {
  delete karte.onEnterFrame;
}
zoommin.onPress = function () {
  karte.onEnterFrame = function() {
  this._xscale -= 4;
  this._yscale -= 4;
  }
}

zoommin.onRelease = function () {
  delete karte.onEnterFrame;
}



Angehängte Dateien:
Adobe Flash Quelldatei kartenanimation-klein.fla50.50 KB
Geändert von froschkoenig712 am 30.08.10 um 22:59 Uhr
jens108#2
Benutzerbild von jens108
Beiträge: 85
Registriert: Aug 2010

30.08.2010, 23:34