You forgot to add a listener ! :)
in the timeline code :
bar.AddListener(this);
and it will listen to all event broadcasted by your Login Class. Note
that it's AddListener not AddEventListener as you're using AsBroadcaster.
As easy as that !
HTH
Alain
eric e. dolecki wrote:
This may sound daft, and perhaps not the way to go, but here is what I am
trying to do (AS2):
I have a class that I would like timeline code to instantiate and call a
method on. I would like the class to broadcast back to whomever is
listening...
simplified class:
import mx.utils.Delegate;
class Login extends AsBroadcaster
{
function Login()
{
};
public function foo( sValue:String ):Void
{
// stuff
broadcastMessage( "attempt", bValue );
};
}
timeline code (not class-based):
var bar:Login = new Login();
bar.foo( "test string" );
function attempt( bValue:Boolean ):Void
{
trace( "the result is " + bValue );
}
===========
Obviously I am missing some pieces here, any quick insights?
- Eric
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com