Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modificações no arraste;

grade do gráfico adicionada;
Atualização da pasta deploy.
  • Loading branch information...
commit b5b63435ea260c64dfc8c9244e0b9d8ac7f2ec53 1 parent b45f009
alexandrefornari alexandrefornari authored
BIN  deployment/AI-0085_SCO.zip
View
Binary file not shown
BIN  deployment/swf/AI-0085.swf
View
Binary file not shown
BIN  src/AI-0085.fla
View
Binary file not shown
18 src/Main.as
View
@@ -229,17 +229,29 @@ package
//addChild(btNew);
}
+ private var posClickCaixa:Point;
private function initDrag(e:MouseEvent):void
{
if (e.target is RadioButton || e.target is SimpleButton) return;
+ posClickCaixa = new Point(caixaOpcoes.mouseX, caixaOpcoes.mouseY);
+
stage.addEventListener(MouseEvent.MOUSE_UP, stopDragCaixa);
- caixaOpcoes.startDrag();
+ stage.addEventListener(MouseEvent.MOUSE_MOVE, movingBox);
+ //caixaOpcoes.startDrag();
+ }
+
+ private function movingBox(e:MouseEvent):void
+ {
+ caixaOpcoes.x = Math.min(700 - caixaOpcoes.width, Math.max(stage.mouseX - posClickCaixa.x, 0));
+ caixaOpcoes.y = Math.min(400 - caixaOpcoes.height, Math.max(stage.mouseY - posClickCaixa.y, 0));
}
private function stopDragCaixa(e:MouseEvent):void
{
- caixaOpcoes.stopDrag();
+ stage.removeEventListener(MouseEvent.MOUSE_MOVE, movingBox);
+ stage.removeEventListener(MouseEvent.MOUSE_UP, stopDragCaixa);
+ //caixaOpcoes.stopDrag();
}
private function addListeners():void
@@ -480,7 +492,7 @@ package
//Graph.board.setCrossSizeAndThick(10, 10);
//Graph.board.setTicks(2, 2, 10, 10);
Graph.board.drawTicks();
- //Graph.board.drawGrid();
+ Graph.board.drawGrid();
Graph.board.addLabels();
Graph.board.disableCoordsDisp();
Graph.setNumPoints(20000);
Please sign in to comment.
Something went wrong with that request. Please try again.