For the 45 seconds bit, you want to use a Timer. To return the clips to their starting points, you need to first store their starting points, perhaps in an Array. When the 45 seconds are up, stop the random movement and cycle over all of your clips giving them their original x, y coordinates.
Accomplishing these things given the code from that article isn't going to be especially clean. Some simple hacks may suffice, however.
To stop the movement, create a global var like this:
var gShouldMove = true;
Then inside of Movieclip.prototype.move, add the following code at the top of the function:
if (!gShouldMove) { return; }
Now you can do some stuff with Timer:
function timerCompleteHandler { gShouldMove = false; }
var myTimer:Timer = new Timer(45000);
myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteHandler);
That should stop the clips from moving after 45 secs.
As for having each clip remember its starting point, you may be able to add that to the MovieClip prototype too. That's not how I'd do it, but since that's what the Kirupa script you're using does already, it is consistent.