JesterXL wrote:

In Flex, yes:

private var my_str:String = "";

<mx:Label text="{my_str}" />

In Flash:

private var my_str:String = "";

this.watch ( "my_str", my_str_watcher);

function my_str_watcher ( prop, oldVal, newVal)
{
   prop = newVal;
dispatchEvent({type: "my_str_changed", target: this, oldVal: oldVal, newVal: newVal});
   return prop;
}

----- Original Message ----- From: "Andreas Rønning" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Wednesday, October 26, 2005 10:47 AM
Subject: [Flashcoders] "Generic listeners"


Dunno how to explain this better, but is there a way to have a String
broadcast an event when it is changed?

- Andreas
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Very cool, thanks

- Andreas
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to