In AS2 you could use broadcastMessage similar to the way you use
dispatchEvent in AS3, but you have to import the classes, set up the
listeners, and I think alter the prototype of the class broadcasting the
message.
In sepy I had a snippet set up for adding broadcasting to a class. Here are
its contents, you can check your file to see if it is following a similar
construct:
// at top
import mx.transitions.BroadcasterMX;
import mx.transitions.OnEnterFrameBeacon;
// in vars
static var __initBroadcaster = BroadcasterMX.initialize
(ClassName.prototype, true);
public var addListener:Function;
public var removeListener:Function;
public var broadcastMessage:Function;
private var _listeners:Array;
/*
* remember to add vars for any call back functions ie:
*
* public var onComplete:Function;
*
*/
// in constructor
this._listeners = [];
this.addListener(this);
// broadcastMessage("onComplete",args);
Bear in mind that you can add other classes, etc as listeners. The use
outlined above would allow you to do something like:
var bla = new ClassName();
bla.onComplete = function(){
// trace("onComplete");
}
Jason Van Pelt
Interactive Developer
504.210.1232 (p) / 504.581.2731 (f)
Peter A. Mayer Advertising, Inc.
www.peteramayer.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders