so,
if i want to change all items size inside a repeater i would go:

private function changeSize():void{
 for(var i:Number = 0;i<btn1.length;i++){
  btn1[i].height = slider1.value;
  btn1[i].width = slider1.value;
 }
} 

???
i thought there is an easier way.
something like : repeater.allChildren().width
--- In [email protected], "jamesdustinmercer"
<[EMAIL PROTECTED]> wrote:
>
> Give the button inside the repeater an id.  Then the button will be 
> accessible through an array syntax, off the button id.
> 
> I.E.
> 
> private function changeSize():void{
>      btnWhatever[0].width = 100;
>      btnWhatever[0].height = 100;
> }
> 
> <mx:Button id="btnWhatever" height="50" width="50" 
>     label="{String(rp.currentItem)}"/>
> 
> --- In [email protected], "shemeshkale" <baldhead72@> 
> wrote:
> >
> > i have a Tile with repeater inside.
> > inside the repeater - a button.
> > pretty simple.
> > 
> > with a slider i want to change the size (width/height) of the 
> button.
> > i works great if i bind width/height to slider value.
> > but how i do it the other way? from the slider to the button?
> > what should come inside the changeSize function?
> > 
> > here is a basic code:
> > 
> > <?xml version="1.0"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
> > 
> >     <mx:Script>
> >         <![CDATA[
> >             [Bindable]
> >             private var dp:Array = [132456789, 2, 3, 4, 5, 6, 7, 
> 8, 9]; 
> >             
> >             private function changeSize():void{
> >                     //what should be here?
> >             }   
> >             
> >         ]]>
> >     </mx:Script>
> > 
> >     <mx:Panel title="Repeater Resize" width="75%" height="75%" 
> >         paddingTop="10" paddingLeft="10" paddingRight="10"
> > paddingBottom="10">
> >   
> >         <mx:HSlider maximum="200" minimum="100" value="120" 
> id="slider1"
> >             change="changeSize()" liveDragging="true"/>
> >             
> >         <mx:Tile direction="horizontal" borderStyle="inset" 
> >             horizontalGap="10" verticalGap="15" width="100%"
> >             paddingLeft="10" paddingTop="10" paddingBottom="10"
> > paddingRight="10">
> >             <mx:Repeater id="rp" dataProvider="{dp}">
> >                 <mx:Button height="50" width="50" 
> >                     label="{String(rp.currentItem)}"/>
> >             </mx:Repeater>    
> >         </mx:Tile>
> >     </mx:Panel>  
> > </mx:Application>
> >
>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to