Foros del Web » Creando para Internet » Flash y Actionscript »

Help with AS3.0

Estas en el tema de Help with AS3.0 en el foro de Flash y Actionscript en Foros del Web. I'm trying to make it appear a line from one point to another with the following code*ActionScript 3.0 Code: Código: function some(evt:MouseEvent):void{ var trapezoid:Shape = ...
  #1 (permalink)  
Antiguo 26/03/2009, 17:55
Avatar de Kottore  
Fecha de Ingreso: octubre-2007
Mensajes: 170
Antigüedad: 16 años, 6 meses
Puntos: 8
Help with AS3.0

I'm trying to make it appear a line from one point to another with the following code*ActionScript 3.0 Code:

Código:
function some(evt:MouseEvent):void{
var trapezoid:Shape = new Shape();
trapezoid.graphics.lineStyle(2, 0xFFD700, 1, false, LineScaleMode.VERTICAL, CapsStyle.NONE, JointStyle.MITER, 10);
trapezoid.graphics.lineTo(evt.stageX, evt.stageY);
this.addChild(trapezoid);}
stage.addEventListener(MouseEvent.MOUSE_MOVE, some);
And everything works fine but I could not find a way to just leave the last line that detects the event*

Would appreciate your help since I'm something new in AS3*

Thanks in advance

Última edición por Kottore; 26/03/2009 a las 18:02
  #2 (permalink)  
Antiguo 26/03/2009, 19:39
 
Fecha de Ingreso: marzo-2009
Mensajes: 13
Antigüedad: 15 años
Puntos: 1
Respuesta: Help with AS3.0

Hi, i dont know what do you want to do, maybe i dont undestand you.

I think you do want to do that?:

function some(evt:MouseEvent):void{
var trapezoid:Shape = new Shape();
trapezoid.graphics.lineStyle(2, 0xFFD700, 1, false, LineScaleMode.VERTICAL, CapsStyle.NONE, JointStyle.MITER, 10);
trapezoid.graphics.lineTo(evt.stageX, evt.stageY);
this.addChild(trapezoid);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, some);
}
stage.addEventListener(MouseEvent.MOUSE_MOVE, some);

I'm sorry if that isnt.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:27.