class CGraphEditBack extends MovieClip { var owner; var area; function CGraphEditBack() { _alpha = 0; _width = owner.area._width; _height = owner.area._height; // useHandCursor = false; last1Click = 0; last2Click = 0; onReleaseOutside = onRelease; } /*+ Button Extent Level 1 */ var last2Click, last1Click, thisClick, clickType; function onPress() { thisClick = (new Date()).getTime(); if (last1Click + 500 < thisClick) { clickType = 'single'; last1Click = thisClick; onSinglePress(); } else if (last2Click + 500 < thisClick) { clickType = 'double'; last2Click = thisClick; onDoublePress(); } else { clickType = 'triple'; last1Click = 0; last2Click = 0; onTriplePress(); } } function onRelease() { if (clickType == 'single') { onSingleRelease(); } else if (clickType == 'double') { onDoubleRelease(); } else { onTripleRelease(); } } /*+ Button Extent Level 2 */ function onSinglePress() { } function onSingleRelease() { } function onDoublePress() { } function onDoubleRelease() { } var lastNewNode; function onTriplePress() { if (owner.editMode == 'create') { lastNewNode = owner.createNewNode(); lastNewNode.onSinglePress(); } } function onTripleRelease() { if (owner.editMode == 'create') { lastNewNode.onSingleRelease(); } } }