I’m confused about what Error #1069 means here. According to what I’ve read, Property here refers to a variable or method. Is there a reason AS is interpreting 2 as a variable?
ReferenceError: Error #1069: Property 2 not found on Number and there is no default value.
at gui_fla::MainTimeline/resizeNode3()
at gui_fla::MainTimeline/rotateLine3()
function resizeNode3(xSize,ySize)
{
var top:Number = 0;
//since all lines are hairlines, this SHOULD work.
mcNode3.mcNodeTitle.width = xSize[2];
mcNode3.mcNodeBody.width = xSize[2];
mcNode3.mcNodeBody.height = ySize[2];
//figure out where the top of the node is
top = mcNode3.mcNodeBody.y - (mcNode3.mcNodeBody.height/2);
//the title bar should be placed 10 higher than that. always 10, as the bar does not resize.
mcNode3.mcNodeTitle.y = top;
}
function rotateLine3(e:Event)
{
resizeNode3(65,55);
xDist[2] = Math.abs(mcNode3.x - mcDot.x);
yDist[2] = Math.abs(mcNode3.y - mcDot.y);
mcLine3.x = mcNode3.x;
mcLine3.y = mcNode3.y;
mcLine3.width = xDist[2];
mcLine3.height = yDist[2];
slope[2]=yDist[2]/xDist[2];
angle[2]=Math.atan(slope[2]/100);
mcLine3.rotation=angle[2];
if(mcNode3.x > mcDot.x)
{
mcLine3.scaleX = -mcLine3.scaleX;
}
if(mcNode3.y > mcDot.y)
{
mcLine3.scaleY = -mcLine3.scaleY;
}
//boundary control
if((mcNode3.x < 0+(mcNode3.width/2)))
{
mcNode3.x = mcNode3.width/2;
}
if((mcNode3.x > 800-(mcNode3.width/2)))
{
mcNode3.x = 800-(mcNode3.width/2);
}
if((mcNode3.y < 0+(mcNode3.height/2)))
{
mcNode3.y = mcNode3.height/2;
}
if((mcNode3.y > 600-(mcNode3.height/2)))
{
mcNode3.y = 600-(mcNode3.height);
}
}