El error me lo tira en la linea 14 y 19..que serian estas
14: set("textY" add i, getProperty ("text" add i, _y ) );
19: }
por las dudas posteo el codigo entero, bueno...desde ya mil gracias. Saludos!!
Código :
colnum = "1";
startnum = 1;
endnum = 19;
numberofItems = 19;
mouseposX = int(getProperty("../dragscale", _x));
mouseposY = int(getProperty("../dragscale", _y));
i = startnum;
m = startnum;
filledSpace = 0;
gapspace = 0;
if (Number(myInit) == Number(FALSE)) {
// on first run make an array of all the text Y Pos.
while (Number(i)<=Number(endnum)) {
set("textY" add i, getProperty ("text" add i, _y ) );
i = Number(i)+1;
}
i = startnum;
myInit = TRUE;
}
boundleft = getProperty ("../boundbox" add colnum, _x);
boundright = boundleft + getProperty ("../boundbox" add colnum, _width) ;
boundtop = getProperty ("../boundbox" add colnum, _y);
boundbottom = boundtop + getProperty ("../boundbox" add colnum,_height);
if (Number(mouseposX)>=Number(boundleft) and Number(mouseposX)<=Number(boundright) and Number(mouseposY)>=Number(boundtop) and Number(mouseposY)<=Number(boundbottom)) {
while (Number(i)<=Number(endnum)) {
myDif = (eval("textY" add i) ) - (mouseposY - boundtop);
// percentage increase
scaleAmount = 250-((myDif*myDif)/16);
alphaAmount = 100-((myDif*myDif)/6);
if (Number(alphaAmount)<50) {
alphaAmount = 50;
}
if (Number(scaleAmount)<100) {
scaleAmount = 100;
}
setProperty("text" add i, _xscale, scaleAmount);
setProperty("text" add i, _yscale, scaleAmount);
setProperty("text" add i, _alpha, alphaAmount);
i = Number(i)+1;
}
// *** add up total Y pixels taken by text ***
while (Number(m)<=Number(endnum-1)) {
filledSpace = filledspace + getProperty ( "text" add m, _height);
m = Number(m)+1;
}
// *** find total Y pixels not taken by text
totalheight = getProperty ( "text" add endnum, _y) - getProperty ( "text" add startnum, _y);
gapSpace = totalheight-filledspace;
avgDistance = gapSpace/numberofitems;
m = Number(startnum)+1;
while (Number(m)<=Number(endnum-1)) {
setProperty("text" add m, _y, (getProperty ( "text" add (m-1), _y) + getProperty ( "text" add (m-1), _height)) + avgdistance);
set("watchheight" add m, getProperty ( "text" add m, _height));
m = Number(m)+1;
}
} else {
// *** shrink text back when mouse rolls out
i = startnum;
while (Number(i)<=Number(endnum)) {
if (int ( getProperty ("text" add i, _yscale ) ) >= 100) {
// return scale back to original state
setProperty("text" add i, _yscale, int ( getProperty ("text" add i, _xscale ) ) - 1);
setProperty("text" add i, _xscale, int ( getProperty ("text" add i, _yscale ) ) -1);
}
if ( getProperty ("text" add i, _y) < eval("textY" add i)) {
// return y position back to original state
setProperty("text" add i, _y, int ( getProperty ("text" add i, _y ) ) + 1);
}
if ( getProperty ("text" add i, _y) > eval("textY" add i)) {
setProperty("text" add i, _y, int ( getProperty ("text" add i, _y ) ) - 1);
}
if ( getProperty ("text" add i, _Alpha) > 50) {
setProperty("text" add i, _alpha, int ( getProperty ("text" add i, _alpha ) ) - 1);
}
i = Number(i)+1;
}
}
