Last modified: allowed!
Well, I couldn’t find the ENTIRE answer here, but I finally got what I was after. Thanks so much for your help and patience.
as a side note: I think I might have had problems using the int and Number types, upon a closer look at my solution, I realized that Number was used, not int. it turns out the number contains floating points, but int does not. my numbers were probably rounded whenever I tried to fix it myself. for everyone I know, the TDI answer might be in place, and using int to fill in could have accumulated rounded numbers. Oh well, you learn something every day.
The correct code to limit movie clips in a clip in a container (or hide or something else) in the mod I was looking for is:
var picContainer:PicContainer = new PicContainer();
picContainer.x = stage.stageWidth / 2 - picContainer.width / 2;
picContainer.y = stage.stageHeight / 2 - picContainer.height / 2;
addChild(picContainer);
var totalPics:int = 17;
var pic:Pic = new Pic();
var xRange:Number = picContainer.width - pic.width;
var spacing:Number = xRange / (totalPics - 1);
var yLoc:Number = picContainer.height / 2 - pic.height / 2;
for(var i:int = 0; i < totalPics; i++) {
pic = new Pic();
pic.x = i * spacing;
pic.y = yLoc;
picContainer.addChild(pic);
}
the logic is pretty simple, and I don’t know why I couldn’t get it myself, because I was drawing diagrams that say exactly that logic. however, I did not have to put the numbers in the right places, or I would not have to ask if I would; P
BONUS CONTENT! as an added bonus (if someone finds this thread looking for answers ..) you can also have a “pic fan” from the center point (but they will still be in order from left to right) using this code:
var picContainer:PicContainer = new PicContainer();
picContainer.x = stage.stageWidth / 2 - picContainer.width / 2;
picContainer.y = stage.stageHeight / 2 - picContainer.height / 2;
addChild(picContainer);
var totalPics:int = 5;
var pic:Pic = new Pic();
var padding:Number = (picContainer.width - (pic.width * totalPics)) / (totalPics + 1);
for(var i:int = 0; i < totalPics; i++) {
pic = new Pic();
pic.x = padding + i * (pic.width + padding);
pic.y = picContainer.height / 2 - pic.height / 2;
picContainer.addChild(pic);
}
Try it, they will make docking stations for large engines!
First edit: Well, there is some progress thanks to TDI, but not a complete solution.
, , , .
example:

:
var newPicContainer:picContainer = new picContainer();
var newPic:pic;
var picwidth:int = 100;
var amountofpics:int = 22;
var i:int;
addChild(newPicContainer);
newPicContainer.x = (stage.stageWidth/2)- (newPicContainer.width/2);
newPicContainer.y = (stage.stageHeight/2)- (newPicContainer.height/2);
var totalpicwidth:int = picwidth*amountofpics;
var totalpadding:int = newPicContainer.width - totalpicwidth;
var paddingbetween:int = (totalpadding / amountofpics);
for (i = 0; i < amountofpics; ++i)
{
this['newPic' + i] = new pic();
this['newPic' + i].width = picwidth;
newPicContainer.addChild(this['newPic' + i]);
if (i != 0)
{
this['newPic' + i].x = this['newPic' + (i-1)].x + picwidth + paddingbetween;
}
else
{
this['newPic' + i].x = 0;
}
}
!
:
, . , . :
, "" ( ) .
var newPicContainer:picContainer = new picContainer();
var newPic:pic;
var amount:int = 9;
var i:int;
addChild(newPicContainer);
newPicContainer.x = (stage.stageWidth/2)- (newPicContainer.width/2);
newPicContainer.y = (stage.stageHeight/2)- (newPicContainer.height/2);
for (i = 0; i < amount; ++i)
{
newPic = new pic();
newPicContainer.addChild(newPic);
trace(newPic.thisOne);
newPic.thisOne = i;
newPic.x = (newPic.width+5) *i;
}
, - " ", , , , "" . , .
- :
newPic.x = (newPic.width *i) - stuff here to make it know not to go past the containing width;
, , .
.