Open GoogleCodeExporter opened 8 years ago
Original comment by darron.schall
on 2 Apr 2007 at 2:57
Original comment by dmcc...@gmail.com
on 26 Dec 2007 at 11:42
hi darron,
i met a problem when implemented the Flowbox,i created more than one flowbox
instance on the stage then used code to add child into them dynamicly.but it
blocked throwing timeout.
i did a simple demo to reproduce it,please see the attached.
the code is :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
xmlns:local="*">
<local:FlowBox id="box1"
x="10"
y="188"
width="226"
height="133"
borderStyle="solid"
borderColor="#E36410"
borderThickness="2"/>
<local:FlowBox id="box2"
x="290"
y="188"
width="223"
height="138"
borderStyle="solid"
borderColor="#37E015"
borderThickness="2"/>
<local:FlowBox id="box3"
x="562"
y="188"
width="194"
height="133"
borderStyle="solid"
borderColor="#179EFC"
borderThickness="2"/>
<mx:Button click="add()"
x="290"
y="77"
label="add"/>
<mx:HSlider minimum="1"
maximum="100"
id="sl"
liveDragging="true"
x="353"
y="128"
snapInterval="1"
value="1"/>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.containers.BoxDirection;
import mx.controls.Label;
private function add():void
{
var arr:ArrayCollection=new ArrayCollection();
for (var i:int=0; i < sl.value; i++)
{
var s:String=String(Math.random().toFixed(int(Math.random() * 10)));
var lbl:Label=new Label();
lbl.text=s;
box1.addChild(lbl);
}
for (var i:int=0; i < sl.value; i++)
{
var s:String=String(Math.random().toFixed(int(Math.random() * 10)));
var lbl:Label=new Label();
lbl.text=s;
box2.addChild(lbl);
}
for (var i:int=0; i < sl.value; i++)
{
var s:String=String(Math.random().toFixed(int(Math.random() * 10)));
var lbl:Label=new Label();
lbl.text=s;
box3.addChild(lbl);
}
}
]]>
</mx:Script>
<mx:Label x="255"
y="128"
text="element count:"/>
</mx:Application>
Thanks very much
Waiting for you response
Fu
Original comment by bat.ne...@gmail.com
on 14 Sep 2010 at 11:56
Attachments:
i attached a complied swf file,please check it.
Thanks
Fu
Original comment by bat.ne...@gmail.com
on 14 Sep 2010 at 11:58
Attachments:
Original issue reported on code.google.com by
darron.schall
on 2 Apr 2007 at 2:57