Thanks for the help Jason, adding the curly braces got it working.
--- In flexcoders@yahoogroups.com, "Jason Szeto" <[EMAIL PROTECTED]> wrote:
>
> Brian,
>
>
>
> Usually it is more helpful if you can post a stack trace with line
> numbers.
>
>
>
> <mx:Glow id="qtyGlow" target="qtyDisplay" color="0x99FF66"/>
>
>
>
> Should be:
>
>
>
> <mx:Glow id="qtyGlow" target="{qtyDisplay}" color="0x99FF66"/>
>
>
>
> You need to assign an effect target to an instance, not to the string
> "qtyDisplay".
>
>
>
> Jason
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Brian
> Sent: Monday, November 26, 2007 1:00 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] error 1006: value not a function; on effect.play()
>
>
>
> I'm getting this error while trying to call play() on a glow effect
> I've created. I'm trying to call play() from within a function that is
> called as a result of a bindable value being changed. Basically I have
> a data model with bindable data and a Label which displays the data.
> When the data changes, I'm trying to play the glow effect on the label
> to highlight the change. What am I doing wrong?
>
> All these objects are defined in the same .mxml file. Relevant
> snippets are :
>
> <myNS:Order id="order">
> ...
> (inside script tag)
> public function getQtyDisplay(currentQty:int, maxQty:int):String {
> var result:String = currentQty+"("+maxQty+")";
> qtyGlow.play();
> }
> ...
> <mx:Glow id="qtyGlow" target="qtyDisplay" color="0x99FF66"/>
> ...
> <mx:Label id="qtyDisplay" text="{getQtyDisplay(order.currentQty,
> order.maxQty)}"/>
>
> The getQtyDisplay() function works fine w/out the play() call. After I
> added it I started getting this error, so I wrapped the play() call in
> a try/catch block.
>