I have a Sprite called list, it contains 16 textfields. what im trying to do is simulate a scrollrect by constently swaping textfields. eg(when a textfield’s y hits a certain number, it gets placed back to 0)
The reason I’m doing this is because of the width/height max of flash 10 3D (same as bitmaps).
PROBLEM : I run it without changing any of the values of list and it works great, but as soon as i turn list in to a 3d displayobject but changing it’s z (list.z = 100) the text no longer render correctly, it’s all srambled.
Here the basic code :
var diff:Number = 0;
var listTotalHeight = 1400;
var scrollRectProxy:Object = {y:0};
TweenLite.to(scrollrectProxy, 5, {y:6400, ease:Strong.easeOut, onUpdate: tweenChangeHandler, onUpdateParams:[scrollRectProxy]});
private function tweenChangeHandler(ref:Object):void
{
while(i < c)
{
var tf:Donator = list.getChildAt(i) as Donator;
tf.y+= diff;
if(tf.y >= this.listTotalHeight) tf.y -= this.listTotalHeight;
i++;
}
diff = (prevScrollRectPos - ref.y);
prevScrollRectPos = ref.y;
}
any ideas?
thanks in advance!