Code von AS 2.0 in AS 3.0 umwandeln [Flash 10]
| Beiträge: 21 Wohnort: Italien Registriert: Jul 2010
| 30.12.2010, 22:22
Hallo Leute,
da bin ich mal wieder mit nem neuen Problem. Hab da so nen Code im Web gefunden aber da stellte sich mir gleich das 1. Problem.
Is leider in Action Script 2.0 -.-
kann mir vielleicht einer bei dieser Sache behilflich sein den Code in Action Script 3.0 umzuwandeln?
danke schonmal
die Datei
Flash_Nerd AS2!!!.fla (7.94 KB)
und der Code
PHP: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
|
// calculate circle hit area
C_hitLeft_x = circleHit._x - 6;
C_hitTop_y = circleHit._y + 6;
C_hitRight_x = circleHit._x + 6;
C_hitBottom_y = circleHit._y - 6;
drag_me.onPress = function() {
startDrag(this, false);
}
drag_me.onRelease = function() {
stopDrag();
// if drag_me is in the circle hit area then make it black
if (this._x < C_hitRight_x && this._x > C_hitLeft_x && this._y < C_hitTop_y && this._y > C_hitBottom_y) {
this.gotoAndStop(5);
}
else {
this.gotoAndStop(1);
}
}
drag_me.onReleaseOutside = function() {
stopDrag();
}
|
achja fast vergessen…
wie kann man noch zusätzlich zu der schon bestehenden cirleHit-area ne 2. erstellen? also in der 1. wird der Kreis blau in der 2. wird er grün… | | | Beiträge: 1776 Wohnort: Laimbach 6 1/2 Registriert: Nov 2002
| 31.12.2010, 02:34
|
|