Focus Event

addEventListener(FocusEvent.FOCUS_IN, showHighLight);
addEventListener(FocusEvent.FOCUS_OUT, hideHighLight);

p1

AS3: Clone or Duplicate Movie

private function cloneDpObj(target:DisplayObject):DisplayObject
{
// create duplicate
var targetClass:Class = Object(target).constructor;

trace("targetClass::" + targetClass);
var duplicate:DisplayObject = new targetClass();

// duplicate properties
duplicate.transform = target.transform;
duplicate.filters = target.filters;
duplicate.cacheAsBitmap = target.cacheAsBitmap;
duplicate.opaqueBackground = target.opaqueBackground;
if (target.scale9Grid) {
var rect:Rectangle = target.scale9Grid;
// WAS Flash 9 bug where returned scale9Grid is 20x larger than assigned
// rect.x /= 20, rect.y /= 20, rect.width /= 20, rect.height /= 20;
duplicate.scale9Grid = rect;
}

// add to target parent's display list
// if autoAdd was provided as true
return duplicate;
}

p1