![]() |
|
||||||||||
|
|||||
|
Регистрация: May 2007
Сообщений: 50
|
По этой функции генерятся кнопки, в итоговой swf эти кнопки не умещаются в сцену.Я сделал скрол,но не могу обратится к Button. Подскажите что нить?
function createBeilagenMenu() {
// creating menu
_root.Loader.removeMovieClip();
var target = _root.createEmptyMovieClip("BeilagenMenu", 1);
target._x = 45;
target._y = 240;
var x = 0;
var y = 0;
var MaxBeilagenColum = 4;
var MaxBeilagenRow = 4;
for (var i = 0; i<_root.Beilagen.length; i++) {
target.attachMovie("Button_bg_small", "Button" add i, Number(i+1));
//=======================================================================================
target["Button" add i].createTextField("MyTextArea", 1, 0, 8, 180, 20);
target["Button" add i].MyTextArea.html = true;
target["Button" add i].MyTextArea.border = false;
target["Button" add i].MyTextArea.wordWrap = false;
target["Button" add i].MyTextArea.autoSize = "center";
target["Button" add i].MyTextArea.embedFonts = true;
target["Button" add i].MyTextArea.selectable = false;
target["Button" add i].MyTextArea.htmlText = _root.Beilagen[i].imageName;
target["Button" add i].MyTextArea.setTextFormat(_root.TextsFormat);
target["Button" add i]._x = x;
target["Button" add i]._y = (y*target["Button" add i]._height)+5;
//=========================================================================
target["Button" add i].parent = Beilagen[i];
target["Button" add i].onRelease = function() {
if (_root.can_make_pdf_array[0] eq "1") {
sPdfUrl = "ads[titelmage]="+this.parent.id+"&colorific="+_root.CurrentColor;
_root.loadVariables(localUrl+"/pdfgenerate", "POST");
}
_root.currentBeilagen = this.parent;
_root.createBeilagenPrewiev(this.parent);
_root.CurrentPage = 2;
_root.gotoAndStop("beilagen2");
};
if (y>MaxBeilagenRow) {
y = 0;
x = x+185;
} else {
y++;
}
}
}
Последний раз редактировалось vARIUM; 29.05.2007 в 18:43. |
|
|||||
|
Et cetera
Регистрация: Sep 2002
Сообщений: 30,787
|
vARIUM, отредактируйте свой пост и оформите код тегами [code][/code].
|
|
|||||
|
Синтаксис хромает
_root.Loader.removeMovieClip();
var target = _root.createEmptyMovieClip("BeilagenMenu", 1);
target._x = 45;
target._y = 240;
var x = 0;
var y = 0;
var MaxBeilagenColum = 4;
var MaxBeilagenRow = 4;
for (var i = 0; i<20; i++) {
target.attachMovie("Button_bg_small", "Button"+i, i+1);
//=======================================================================================
target["Button"+i].createTextField("MyTextArea", 1, 0, 8, 180, 20);
target["Button"+i].MyTextArea.html = true;
target["Button"+i].MyTextArea.border = false;
target["Button"+i].MyTextArea.wordWrap = false;
target["Button"+i].MyTextArea.autoSize = "center";
target["Button"+i].MyTextArea.embedFonts = true;
target["Button"+i].MyTextArea.selectable = false;
target["Button"+i].MyTextArea.htmlText = _root.Beilagen[i].imageName;
target["Button"+i].MyTextArea.setTextFormat(_root.TextsFormat);
target["Button"+i]._x = x;
target["Button"+i]._y = (y*target["Button"+i]._height)+5;
//=========================================================================
target["Button"+i].parent = Beilagen[i];
target["Button"+i].onRelease = function() {
if (_root.can_make_pdf_array[0] eq "1") {
sPdfUrl = "ads[titelmage]="+this.parent.id+"&colorific="+_root.CurrentColor;
_root.loadVariables(localUrl+"/pdfgenerate", "POST");
}
_root.currentBeilagen = this.parent;
_root.createBeilagenPrewiev(this.parent);
_root.CurrentPage = 2;
_root.gotoAndStop("beilagen2");
};
if (y>MaxBeilagenRow) {
y = 0;
x = x+185;
} else {
y++;
}
}
|
|
|||||
|
Регистрация: May 2007
Сообщений: 50
|
да да, ощибка вышла, но мне надо использовать target в котором генятся кнопки, чтобы скролить их потом.
|
|
|||||
|
Регистрация: May 2007
Сообщений: 50
|
Все уже не надо.
|
![]() |
![]() |
Часовой пояс GMT +4, время: 07:07. |
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | |
| Опции просмотра | |
|
|