pixum
07-19-2008, 10:18 PM
hi,
i guess a real beginner question :eek: -
i am working on an image gallery, in which the thumbnails will float up and down randomly, with the stageHeight as border.
This works all fine, but now I wanted to add it to a container, so I can change it to a new size (making it bounce not on the entire stageHeight).
Pls see code below, just a simple example without the floating function and only two testboxes, but enough to show the problem:
var container:MovieClip = new MovieClip();
addChild(container);
/*including the following lines doesn't display anything anymore - leaving it out works fine:
container.height = 400;
container.width = 400;*/
var firstBox:TestBox = new TestBox();
var secBox:TestBox = new TestBox();
container.addChild(firstBox);
container.addChild(secBox);
firstBox.x = 50;
secBox.x = 350;
Leaving the 2 lines in question out sizes the container to the whole stage again ...
pixum
i guess a real beginner question :eek: -
i am working on an image gallery, in which the thumbnails will float up and down randomly, with the stageHeight as border.
This works all fine, but now I wanted to add it to a container, so I can change it to a new size (making it bounce not on the entire stageHeight).
Pls see code below, just a simple example without the floating function and only two testboxes, but enough to show the problem:
var container:MovieClip = new MovieClip();
addChild(container);
/*including the following lines doesn't display anything anymore - leaving it out works fine:
container.height = 400;
container.width = 400;*/
var firstBox:TestBox = new TestBox();
var secBox:TestBox = new TestBox();
container.addChild(firstBox);
container.addChild(secBox);
firstBox.x = 50;
secBox.x = 350;
Leaving the 2 lines in question out sizes the container to the whole stage again ...
pixum