ActionScript to change Registration Point of Movie Clip for Dynamically loaded Movie

Below is the code I found on some forum that help in changing the registration point of dynamically loaded Images, that help in rotation of movieclip. Basically it only create new _xreg and _yreg points that need to be adjust to change coordinate system before you rotate image/movieclip using _rotation2 variable.
It works for Action [...]

Calling Path in ActionScript

var kLastSlash:Number = _root._url.lastIndexOf(‘/’);
var baseUrl:String = _root._url.substr(0, kLastSlash+1);

trace() function to work for Browser

http://yourpalmark.com/2005/07/01/trace-from-the-browser-using-standard-trace/
I try this article and it actually works.
Thanks to Fernando and Ernie, the Flash programmers, who told me about this article and some other great technique to program in ActionScripting.

Replace Function for ActionScript 2.0

function searchAndReplace(holder, searchfor, replacement) {
 temparray = holder.split(searchfor);
 holder = temparray.join(replacement);
 return (holder);
}
Do I need to say anything else ?

Adding Filters/effect on MovieClip through ActionScript

How to enter the Filter effects on MovieClip using ActionScript, A developer way.