гуры! не смейтесь надо мной... первая попытка! =))

Код:
_root.levels = 0;
_root.levels++;
_root.createEmptyMovieClip("bar", 10000000);
with (_root["bar"]) {
_visible = 0;
moveTo(0, 0);
lineStyle(0, 0x222222, 100);
beginFill(0x0000ff, 10);
lineTo(0, 100);
lineTo(100, 100);
lineTo(100, 0);
lineTo(0, 0);
endFill();
}
_root.onMouseDown = function() {
_root.down = 1;
_root["bar"]._visible = 1;
_root["bar"]._x = _root._xmouse;
_root["bar"]._y = _root._ymouse;
_root["bar"]._width = _root._xmouse-_root["bar"]._x;
_root["bar"]._height = _root._ymouse-_root["bar"]._y;
};
_root.onMouseUp = function() {
if (_root.down) {
_root["bar"]._visible = 0;
_root.down = 0;
w = _root["bar"]._xscale;
x = _root["bar"]._x;
if (_root["bar"]._xscale<0) {
w = -_root["bar"]._xscale;
x -= w;
}
h = _root["bar"]._yscale;
y = _root["bar"]._y;
if (_root["bar"]._yscale<0) {
h = -_root["bar"]._yscale;
y -= h;
}
_root.levels++;
name = "text" add _root.levels;
_root.createEmptyMovieClip(name, _root.levels);
_root[name]._alpha = 1;
_root[name].onEnterFrame = function() {
if (this._alpha<100) {
this._alpha *= 2;
} else {
_this._alpha = 100;
this.onEnterFrame = function() {
};
}
};
_root[name]._x = 0;
_root[name]._y = 0;
_root[name].createTextField(name, 1, x, y, w, h);
with (_root[name][name]) {
embedFonts = 1;
selectable = 0;
border = 0;
multiline = 1;
wordWrap = 1;
background = 0;
text = _name add " my first steps in MX" add " text text text text text text text text ";
}
tf = new TextFormat();
tf.font = "Arial_";
_root[name][name].setTextFormat(tf);
}
};
_root.onMouseMove = function() {
if (_root.down) {
_root["bar"]._xscale = _root._xmouse-_root["bar"]._x;
_root["bar"]._yscale = _root._ymouse-_root["bar"]._y;
}
};