[EMAIL PROTECTED] Tue Apr 13 07:20:48 2004
Return-Path: <[EMAIL PROTECTED]>
X-Sender: [EMAIL PROTECTED]
X-Apparently-To: [email protected]
Received: (qmail 61173 invoked from network); 13 Apr 2004 14:20:47 -0000
Received: from unknown (66.218.66.172)
  by m8.grp.scd.yahoo.com with QMQP; 13 Apr 2004 14:20:47 -0000
Received: from unknown (HELO mail3.panix.com) (166.84.1.74)
  by mta4.grp.scd.yahoo.com with SMTP; 13 Apr 2004 14:20:47 -0000
Received: from echonyc.com (echonyc.com [198.67.15.2])
  by mail3.panix.com (Postfix) with ESMTP id 3D21B98561
  for <[email protected]>; Tue, 13 Apr 2004 10:20:13 -0400 (EDT)
Received: from Trotman.tapper.net (170-226.customer.cloud9.net 
[168.100.170.226])
  by echonyc.com (8.11.6/8.11.6) with ESMTP id i3DEKCU16791
  for <[email protected]>; Tue, 13 Apr 2004 10:20:12 -0400 (EDT)
Message-Id: <[EMAIL PROTECTED]>
X-Sender: [EMAIL PROTECTED]
X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1
Date: Tue, 13 Apr 2004 10:19:55 -0400
To: [email protected]
In-Reply-To: <[EMAIL PROTECTED]
  edia.com>
References: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
X-eGroups-Remote-IP: 166.84.1.74
From: jeff tapper <[EMAIL PROTECTED]>
Subject: Setting a button icon in a repeater?
X-Yahoo-Group-Post: member; u=180891050
X-Yahoo-Profile: jefftappernyc

Hey folks, I've got what should be a simple issue, and im probably just 
under caffinated, so im not seeing it.

I'm trying to create buttons with an icon in a repeater. The repeater is 
working fine, and the proper data is being loaded into my custom component, 
but i'm having trouble setting the icon dynamically. Can someone point me 
in the right direction?

Heres what i have:

<?xml version="1.0" encoding="utf-8"?>
<mx:Box direction="horizontal" 
xmlns:mx="http://www.macromedia.com/2003/mxml"; width="200" height="20" 
load="start()">
<mx:Label text="{name}" visible="{isSelected}" />
<mx:Button width="20" height="20" click="changeColor()" id="colorButton"/>
<mx:Binding destination="colorButton.icon" source="colorAsset"/>
<mx:Script>
var colorData:Object;
var isSelected:Boolean;
var asset:String;
var name:String;
var colorId:String;
function changeColor(){
dispatchEvent();
}
function get colorAsset():String{
return "@Embed('" + asset +"')";
}
</mx:Script>
</mx:Box>

Thanks for any help.

jeff


Reply via email to