Ver Mensaje Individual
  #14 (permalink)  
Antiguo 08/08/2004, 15:56
antichavez
 
Fecha de Ingreso: noviembre-2003
Ubicación: Venezuela
Mensajes: 344
Antigüedad: 20 años, 5 meses
Puntos: 0
nab, escribiste el mensaje al mismo tiempo que yo...yo te respondi este:

supongo q se ara con :
_root.onMouseDown, con _xmouse, _ymouse y no muxo mas no?

__________________________________________________ ________

Codigo de la mariquita original, con keys...no es con mouse pero le puedes incluir lo de Nab:

onClipEvent (load) {
// declare and set speed variable
speed = 5;
}
onClipEvent (enterFrame) {
// move up, down, left, or right
if (Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)) {
_x -= speed;
_rotation = 270;
}
if (Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT)) {
_x += speed;
_rotation = 90;
}
if (Key.isDown(Key.UP) && !Key.isDown(Key.DOWN)) {
_y -= speed;
_rotation = 0;
}
if (Key.isDown(Key.DOWN) && !Key.isDown(Key.UP)) {
_y += speed;
_rotation = 180;
}
//
// move diagonally
if (Key.isDown(Key.LEFT) && Key.isDown(Key.UP) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.DOWN)) {
_rotation = 315;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.UP) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.DOWN)) {
_rotation = 45;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.UP)) {
_rotation = 225;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.UP)) {
_rotation = 135;
}
//
// loop to opposite side of the masked area when the beetle travels off-screen
if (_y<0) {
_y = 231;
}
if (_y>231) {
_y = 0;
}
if (_x<231) {
_x = 465;
}
if (_x>465) {
_x = 231;
}
//
// maintain position and rotation of beetle shadow
with (_root.shadow) {
_x = this._x+3;
_y = this._y+3;
_rotation = this._rotation+90;
}
}