![]() |
|
||||||||||
|
|||||
|
[+4 13.06.07]
|
Здравствуйте.
Нужно сделать чтобы при наведении на кнопку текст двигался(есть полный исходник в конце).. Вот вырезки из кода for (var i = 0; i<len; i++) {
_root.attachMovie("btn", "btn"+i, i, {_x:100, _y:(5+50*i)});
var b = _root["btn"+i];
b.my_text.text = menu_xml.childNodes[0].childNodes[i].attributes.name;
b.my_text.autoSize = true;
b.link = menu_xml.childNodes[0].childNodes[i].attributes.link;
b.onRelease = function() {
getURL(this.link, "_self");
};
b.onRollOver = function() {
this.gotoAndPlay("l2");
tween1 = new Tween(this, "_x", Regular.easeOut, 20, 50, 1.5, true);
};
}
|
|
|||||
|
Регистрация: Aug 2006
Сообщений: 21
|
import mx.transitions.Tween; import mx.transitions.easing.*; for (var i = 0; i<len; i++) { _root.attachMovie("btn", "btn"+i, i, {_x:100, _y:(5+50*i)}); var b = _root["btn"+i]; b.my_text.text = menu_xml.childNodes[0].childNodes[i].attributes.name; b.my_text.autoSize = true; b.link = menu_xml.childNodes[0].childNodes[i].attributes.link; b.onRelease = function() { getURL(this.link, "_self"); }; b.onRollOver = function() { this.gotoAndPlay("l2"); this.tw = new Tween(this, "_x", Regular.easeOut, 20, 50, 1.5, true); }; }
__________________
Почему бы и нет? |
![]() |
![]() |
Часовой пояс GMT +4, время: 10:21. |
|
|
« Предыдущая тема | Следующая тема » |
|
|