Salve sn nuovo di questo linguaggio e volevo chiedervi, io ho creato questa classe:
class Card {
var _points;
var _d;
var _i;
var _t;
public function Card(up, right, down, left, t, i, d) {
_points = new Array(up, right, down.left);
_root.createEmptyMovieClip(i, d);
_d = d;
_i = i;
_t = t;
}
public function get UpPoint() {
return _points[0];
}
public function set UpPoint(value) {
_points[0] = value;
}
public function get RightPoint() {
return _points[1];
}
public function set RightPoint(value) {
_points[1] = value;
}
public function get DownPoint() {
return _points[2];
}
public function set DownPoint(value) {
_points[2] = value;
}
public function get LeftPoint() {
return _points[3];
}
public function set LeftPoint(value) {
_points[3] = value;
}
public function DrawCard(x, y) {
_root.getInstanceAtDepth(_d).moveTo(x, y);
_root.getInstanceAtDepth(_d).lineStyle(1, 0x000000, 100);
if (_t == 1) {
var w = x+100;
var h = y+150;
} else {
var w = x+50;
var h = y+75;
}
_root.getInstanceAtDepth(_d).lineTo(w, y);
_root.getInstanceAtDepth(_d).lineTo(w, h);
_root.getInstanceAtDepth(_d).lineTo(x, h);
_root.getInstanceAtDepth(_d).lineTo(x, y);
}
}
ora però avrei bisogno di gestire gli eventi onClick e onMouseOver degli oggetti di questa classe... qualcuno sa aiutarmi? grazie

Rispondi quotando