repeater in as3

12 views
Skip to first unread message

amutha

unread,
Nov 12, 2009, 1:04:53 AM11/12/09
to Flex India Community
box_v=new VBox();
babyactimg=new Image();
rep=new Repeater();
addChild(box_v);
rep.dataProvider=cat.img;
babyactimg.source=rep.currentItem.@src;
babyactimg.width=30;
babyactimg.height=30;
addChild(babyactimg);
box_v.addChild(rep);
this was i done in as3 but i got the first record only…what can i do
for get all the records from the repeater using as3..

kalai selvi

unread,
Nov 12, 2009, 2:19:24 AM11/12/09
to flex_...@googlegroups.com
increase the height of the VBOX .


--

You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To post to this group, send email to flex_...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=.



amutha

unread,
Nov 12, 2009, 2:29:37 AM11/12/09
to Flex India Community
i did it. but it doesn't work..its show the same output....

On Nov 12, 12:19 pm, kalai selvi <kalai.ran...@gmail.com> wrote:
> increase the height of the VBOX .
>
> On Thu, Nov 12, 2009 at 11:34 AM, amutha <raju.amu...@gmail.com> wrote:
> > box_v=new VBox();
> > babyactimg=new Image();
> > rep=new Repeater();
> > addChild(box_v);
> > rep.dataProvider=cat.img;
> > babyactimg.source=rep.currentItem.@src;
> > babyactimg.width=30;
> > babyactimg.height=30;
> > addChild(babyactimg);
> > box_v.addChild(rep);
> > this was i done in as3 but i got the first record only…what can i do
> > for get all the records from the repeater using as3..
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Flex India Community" group.
> > To post to this group, send email to flex_...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > flex_india+...@googlegroups.com<flex_india%2Bunsu...@googlegroups.com>
> > .

amutha

unread,
Nov 12, 2009, 5:23:05 AM11/12/09
to Flex India Community
i got the all the records using loop which was mention in the above
answer......thanks for all...here is my code ....

box_v=new VBox();
box_v.height=300;
addChild(box_v);
rep=new Repeater();
rep.setStyle("verticalCenter","0");
rep.setStyle("horizontalCenter","0");
var Y:int=25;
for(var i:int=0;i<cat.img.length();i++)
{
rep.dataProvider=cat.img[i];
babyactimg=new Image();
babyactimg.source=rep.currentItem.@src;
//Alert.show((rep.currentItem.valueOf()).toString());
babyactimg.height=62;
babyactimg.width=62;


if(i>=0)
{
babyactimg.y=Y;
Y+=babyactimg.height;
}
rep.addChild(babyactimg);
}
box_v.addChild(rep);

venki @flex

unread,
Nov 12, 2009, 6:21:11 AM11/12/09
to Flex India Community
have a loop madam... it will wrk..
Reply all
Reply to author
Forward
0 new messages