In this chapter, we'll use a few ideas from the previous recipes to make that actual graph data draggable. When the recipe is implemented, the user can click-and-drag data points to new locations.
We will start from the familiar point graph:
package com.graphing.drag { import flash.display.Sprite; import com.graphing.PointGraph; public class Recipe6 extends Sprite { private var _graph:PointGraph; private var _data:Array = [[0,20],[50,70],[100,0],[150,150],[200,300],[250,200],[300,400],[350,20],[400,60],[450,250],[500,90],[550,400],[600,500],[650,450],[700,320]]; public function Recipe6() { _graph = new PointGraph(); _graph.data = _data; _graph.graphWidth = 800; _graph.graphHeight = 600; _graph.graphLeft = -50; _graph.graphRight = 750; _graph.graphTop = 550; _graph.graphBottom = -50; _graph...