Flash MX 2004.
document.swapElement(name)
name A string that specifies the name of the library item to use.
Nothing.
Method; swaps the current selection with the specified one. The selection must contain a graphic, button, movie clip, video, or bitmap. This method displays an error message if no object is selected or the given object could not be found.
The following example swaps the current selection with Symbol 1 from the library:
fl.getDocumentDOM().swapElement('Symbol 1');