First, thanks for all replies to date.
Just in case there's any confusion, I should point out that my problem
isn't with the text field, but with the TextArea component (which
contains a text field). I can probably listen to the text field within
the TextArea component instance, but that seems sort of like a hack to
me.
For an illustration of my problem, please see this code. You need to be
running FMX2004 and have the TextArea component in your library so it
can be attached dynamically.
this_mc = _root;
// Create listener
my_listener = new Object();
my_listener.change = function(item) {
trace(item+" changed");
};
// Create TextArea
this_mc.attachMovie('TextArea', 'my_ta', 1);
// Attach listener
this_mc.my_ta.addEventListener("change", my_listener);
// Function to change the TA dynamically
changeInt = setInterval(changeThem, 2000);
function changeThem() {
this_mc.my_ta.text = "Something";
}
The listener fires off no problems when you type in the TextArea, but
when it's changed by the setInterval function I get nothing, nada.
Any suggestions much appreciated.
Cheers
Jesse Stratford
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Heshan
Sent: Friday, October 03, 2003 7:55 AM
To: Flash Developers List
Subject: [fugli] Re: TextArea.change not triggered by dynamic changes?
Hey
u dont need a listner to fire up onChanged for a text box
txtboxname.onChanged = function(){
//
}
should do, and ive done it for dynamic changes as well so it should work
Hesh
----- Original Message -----
From: "James Ellis" <[EMAIL PROTECTED]>
To: "Flash Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 02, 2003 5:11 PM
Subject: [fugli] Re: TextArea.change not triggered by dynamic changes?
> Hey Jesse
>
> Have you set up a listener on the text field.. according to the ASD,
onChanged
> should fire whenever the .text content is altered
>
> HTH
>
> James Ellis
> www.webqs.com
> ---
> WSG - http://webstandardsgroup.org | Web Standards Group
> syd::php - http://sydney.ug.php.net | Sydney PHP Developers
> ---
> #300 - http://www.sitepoint.com/articlelist/300
> ---
>
> ---------- Original Message -----------
> From: "Jesse Stratford" <[EMAIL PROTECTED]>
> To: "Flash Developers List" <[EMAIL PROTECTED]>
> Sent: Thu, 2 Oct 2003 14:53:07 +1000
> Subject: [fugli] TextArea.change not triggered by dynamic changes?
>
> > As far as I can determine, the TextArea.change event (Flash MX 2004
> > Pro) is only broadcast when changes are made manually by a user
typing
> > in the TextArea. I need to be alerted when the value of my TextArea
> > changes based on dynamic input from a WebServiceConnector. I've
tried
> > watching the property "text" but I think it's just an alias for
> > another property and I'd rather not have to use a hack to get this
to
> > work. Surely the components have a generalized 'change' broadcaster
> > which is triggered by dynamic changes too, or at least a separate
one
> > for dynamic changes... Don't they?
> >
> > Cheers
> >
> > Jesse Stratford
> >
> > ---
> > You are currently subscribed to fugli as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
[EMAIL PROTECTED]
> >
> > MX Downunder AsiaPac DevCon - http://mxdu.com/
> ------- End of Original Message -------
>
>
> ---
> You are currently subscribed to fugli as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
[EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
>
---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/