Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/12/2008, 07:12
taxiarcos
 
Fecha de Ingreso: agosto-2008
Mensajes: 26
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Mover objeto en funcion de un parametro

Muchas gracias Pitillos!!

Hasta ahora he conseguido hacer esto (que ya es mucho):

Código:
this.showq = this.createEmptyMovieClip("prova", 99);
//this.showq.beginFill(0xFF0000, 0);
this.showq.lineStyle(0, 0xFF0000, 100);
this.showq.moveTo(0, 0);
this.showq.lineTo(Stage.width/2, 0);
this.showq.lineTo(Stage.width/2, Stage.height/2);
this.showq.lineTo(0, Stage.height/2);
this.showq.lineTo(0, 0);
//this.showq.endFill();
function pos(ndx:Number):Void {
	switch (ndx) {
	case 1 :
		this.showq._x = 0;
		this.showq._y = 0;
		break;
	case 2 :
		this.showq._x = Stage.width/2;
		this.showq._y = 0;
		break;
	case 3 :
		this.showq._x = 0;
		this.showq._y = Stage.height/2;
		break;
	case 4 :
		this.showq._x = Stage.width/2;
		this.showq._y = Stage.height/2;
		break;
	default :
		this.showq._visible = false;
	}
}
this.createTextField("myTxt", 100, 0, 0, 100, 20);
myTxt.autoSize = "left";
if (_level0.quad == undefined) {
	myTxt.text = "Quad is not defined";
} else {
	myTxt.text = _level0.quad;
}
pos(Number(_level0.quad));
Las partes comentadas son porque primero he hecho la prueba con un rectangulo completo, pero lo que quiero hacer es que me aparezca solo el contorno. Pero tengo un problema, las partes del recuadro que tocan con la derecha y abajo (right&bottom) no se ve! no se si es porque sale fuera de rango o bien porque realmente no se pinta!