Random Movement Object problem

I’ve been try to use the Random Movement code from the Flash MX section but I can’t seem to get it to work right when I put it at the mid-section of my document.

I’ve been trying to tweak the code to adjust how far the objects will move and it works a little but some of the objects will stay stray to the top, I think because it is due to this.diffx and this.diffy.

I also tried putting it in it’s own movie, but when that happens the object doesn’t move anymore. It simply teleports form one position to another and I have no clue how to deal with that either.

Thanks for any help.