Loading JPG's dynamically

just wondering if you load a JPG dynamically as per tutorial, and have it dragable on screen, how would you close it?? can it be turned into a button and still dragable???

also,

can his code be applied to an external SWF tomake it dragable…

_root.onMouseDown = function () {
startDrag (“container”,false) ;
}
_root.onMouseUp = function () {
stopDrag () ;
}

doesn’t seem to work.