Thread: button skin
View Single Post
  #4 (permalink)  
Old 10-15-2008, 11:15 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: button skin


"Merlyn MM" <webforumsuser@macromedia.com> wrote in message
news:gd5llm$3l3$1@forums.macromedia.com...
> If I give the file name it works but thats not what I am looking for. The
> file
> name is provided by the data provider and the button is inside a repeater.
> Each
> button has a different image file which is provided by
> myRepeater.currentItem.ICON
>
>
> <mx:Repeater id="myRepeater" dataProvider="{catInfo}">
> <mx:HBox id="bigbox">
> <mx:Image id="img" source="{myRepeater.currentItem.ICON}"/>
> <mx:Button width="175" label="{myRepeater.currentItem.CATEGORYDESC}"
> data="{myRepeater.currentItem}" mouseOver="changeStyle(event)"
> upSkin="@Embed(source='{myRepeater.currentItem.ICO N}')"
> click="displayId(event.target.getRepeaterItem())"
> mouseUp="categorySummarySelected(event.target.repe aterIndices[0])"/>
> </mx:HBox>
> </mx:Repeater>


An embed is just that. it _embeds_ the file. At compile time. I.e. the
compiler has no idea what the value will be in your running file. You might
want to look at my TileList_withStyleFunction to get some inspiration on how
to handle this situation:
http://flexdiary.blogspot.com/2008/0...efunction.html


Reply With Quote