PDA

Просмотр полной версии : как сделать без gotoAndPlay(1); ???


fiot
09.10.2002, 00:31
есть такой код
// ---::text::---------------------------------------------
_root.createTextField("mytext", 2000, x_, y_, 100, 100);
mytext.multiline = 1;
mytext.wordWrap = 1;
mytext.border = 0;
myformat = new TextFormat();
myformat.color = 0x000000;
myformat.bullet = 0;
myformat.underline = 0;
mytext.selectable = 0;
mytext.text = "x= "+_root._xmouse+" y= "+_root._ymouse;
mytext.setTextFormat(myformat);
// ---end_text-----------------------

в нём определяются координаты мышки... беда в том что не знаю как сделать так что бы при перемещении мышки тексфилд апдейтился... желательно программые решения...

TTS
09.10.2002, 02:05
Да ты почти всё написал уже:
// ---::text::---------------------------------------------
_root.createTextField("mytext", 2000, x_, y_, 100, 100);
mytext.multiline = 1;
mytext.wordWrap = 1;
mytext.border = 0;
myformat = new TextFormat();
myformat.color = 0x000000;
myformat.bullet = 0;
myformat.underline = 0;
mytext.selectable = 0;
createEmptyMovieClip("textupdater",1);
textupdater.onMouseMove=function(){
mytext.text = "x= "+_root._xmouse+" y= "+_root._ymouse;
mytext.setTextFormat(myformat);
}
// ---end_text-----------------------
Только не забудь, что теперь depth=1 занята.

Nox Noctis
09.10.2002, 13:44
все еще проще :)
ни к чему плодить побочные клипы ! ;)
mytext.onMouseMove = function() {
this.text = "x= "+_root._xmouse+" y= "+_root._ymouse;
};
Mouse.addListener(myText);

fiot
10.10.2002, 02:45
Ребят, спасибо!!!!!! Помогло !!!!!!! :) :)