theDeSilva.com Andrew de Silva

ReferenceError: Error #1069: Property startDrag not found on flash.text.TextField

August 4th, 2010 · No Comments · Flash, Flex

Here’s a quick solution to the error ReferenceError: Error #1069: Property startDrag not found on flash.text.TextField . This normally happens when you are trying to get the TextField to drag.

 
textField.addEventListener(MouseEvent.MOUSE_DOWN, drag);
textField.addEventListener(MouseEvent.MOUSE_UP, drop);
 
// by setting mouseChildren = false it makes the drag function to use the container 
// of the movie clip rather than the compenent within the movieclip. 
// This is where the ReferenceError: Error #1069: Property startDrag 
// not found on flash.text.TextField is coming from 
 
textField.mouseChildren = false;
textField.text1.selectable = false;
 
function drag(e:MouseEvent):void {
	e.target.startDrag();
}
 
 
function drop(e:MouseEvent):void {
  	e.target.stopDrag();
}

Tags: ···