# Auto-customizing text cursor

**URL:** <https://forum.kirupa.com/t/auto-customizing-text-cursor/188446>\
**Category:** Uncategorized\
**Created:** [May 8, 2006, 2:04am UTC](https://forum.kirupa.com/t/auto-customizing-text-cursor/188446 "2006-05-08T02:04:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mofongo9](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mofongo9](https://forum.kirupa.com/u/mofongo9)\
**Post date:** [May 8, 2006, 2:04am UTC](https://forum.kirupa.com/t/auto-customizing-text-cursor/188446/1 "2006-05-08T02:04:49Z")

</div>

auto-customizing text cursor that detects the website its being hosted on

```auto
Mouse.hide();
stop();
txtsep = 10;
index = 0;
var url:String = _url;
txt = url.substring(0, url.indexOf("/", 7));
X = 0;
for (j=1; j<=txt.length; j++) {
    _root.createEmptyMovieClip("MC"+j, j);
    _root["MC"+j].createTextField("taxt", j, X, 0, 50, 50);
    _root["MC"+j].taxt.text = _root.txt.charAt(index);
    _root["MC"+j].taxt.selectable = false;
    index++;
    X += txtsep;
}
onEnterFrame = function () {
    for (i=0; i<=txt.length; i++) {
        _root["MC"+i]._y -= (_root["MC"+i]._y-_root._ymouse)/_root["MC"+i]._name.substring(2, 99);
        _root["MC"+i]._x -= (_root["MC"+i]._x-_root._xmouse)/_root["MC"+i]._name.substring(2, 99);
    }
};

```

[http://img185.imageshack.us/my.php?image=cooltexteffect7tx.swf](http://img185.imageshack.us/my.php?image=cooltexteffect7tx.swf)

i made it so that, like, someone could paste the code into their flash website and have a customized cursor for their site without doing anything at all xD

if you want to test it, paste the code into a fla and upload it to [denvish.net](http://denvish.net) or photobucket or something.

if you want to have your own text instead of the website name, replace the line

```auto
txt = url.substring(0, url.indexOf("/", 7));

```

with

```auto
txt = "Enter your text here, dont delete the quotation marks.";

```
