Another make a loaded swf dragable

Hello again!
I should be able to manage this myself but I fail.
I got following code from scotty, and it functions if I have the code in the main timeline. But for me it´s better to have it on the button but I get the error:

Statement must appear within on handler function preLoad(box, clip) {

Can someone please help me with this.
I have this code on the button:

on (press) {
		var box = _root.createEmptyMovieClip("holder", _root.getNextHighestDepth());
		box._x = 150;
		box._y = 100;
		preLoad(box, "loaded.swf");
function preLoad(box, clip) {
		var temp = this.createEmptyMovieClip("temp", this.getNextHighestDepth());
		temp.onEnterFrame = function() {
				if (box.getBytesLoaded() == box.getBytesTotal() && box.getBytesTotal()>4) {
						box.drag.onPress = function() {
						box.drag.onRelease = function() {
						delete this.onEnterFrame;