Accessibility
Adobe
Sign in Privacy My Adobe

Flash Professional ActionScript Classes & Libraries

Adobe Exchange: The new way to discover and install plug-ins, extensions and content for the Creative Suite. Get it now

StEventDispatcher

By philipcw January 14, 2005
39,216 Downloads

Rating = 423 votes


StEventDispatcher v1.1.1 update:<br>- updated reference and documentation.<br><br>StEventDispatcher v1.1.0 update:<br>- fixes the initializing implementation when sending the initialize parameter as an object's prototype (when assigning the eventdispatcher to a component).<br>- instantiate method added for executing the initialize myObject.prototype issue stated above.<br><br>StEventDispatcher v1.0.2 update:<br>- fixes the removeEventListener method so it accepts the "all" argument for the parameter eventName.<br>- removedEventListener, the returned 'listener' value is an array of eventName instead of a reference to the eventQueue<br>- the undocumented params on the eventObject will now be sent on the eventObject to the listener<br>- the eventObject will now be sent correctly listeners that are functions<br><br>StEventDispatcher - adds event handling to an object or custom component. It enables you to add and remove listeners for events that will dispatch when they are triggered (this is called event dispatching); these events are associated with the component instance or object to which FStEventDispatcherClass has been applied.<br><br>FStEventDispatcherClass - is a custom component class which simulates the new event model for Flash MX 2004 components. It was developed as a Flash MX 6 (AS-1) component to extend any Flash MX component class with an event model. For an extensive understanding of this event model go to Macromedia's Flash support website and download the PDF: Using Components (section: creating components -> event handling).<br><br>StEventDispatcher - adds a few features to Macromedia's event model:<br>1. a scope parameter has been added to the addEventListener method<br>2. with removeEventListener method the eventName, elem, and deleteCount parameters allow you to listeners from the corresponding arrays by 'shift', 'pop' or elem number and deleteCount; setting elem to null removes all listeners for the eventName; setting the eventName to 'all' removes all listeners for the component instance.<br>3. a few extra methods have been added to the dispatcher (class) and I have not decided which will stay in:<br>- componentInstance.getEventQueue()<br>- componentInstance.getEventListener(eventName)<br>- componentInstance.setDispatchedListener<br>- componentInstance.removedEventListeners<br><br>StEventDispatcher is a freely distributable component and is distributed on an "as is" basis. Any distribution of the FStEventDispatcherClass must include the 3 line copyright notice as follows:<br>ShockTime's StEventDispatcherClass<br>Copyrite 2003 Philip Williams, all rights reserved.<br>support@shocktime.com

SUPPORT INFORMATION
StEventDispatcher version 1.1.0 and 1.02 updates: // The following example adds the FStEventDispatcherClass // methods to an object instance: FStEventDispatcherClass.prototype.initialize(_root.myObject); // the following line goes in the constructor function for component implementation FStEventDispatcherClass.prototype.instantiate(this)

UI Access:
The component can be found in the Flash->Windows->Components panel<br>It will be listed as StEventDispatcher

Download

License: Freeware
Cost: Free
OS: Win | Mac
File format: MXP | 32.7 KB

Additional extension information

Author: philipcw
Author website: http://www.shocktime.com
Date published: January 14, 2005
Approval: Basic
Browsers: Internet Explorer ALL | Mozilla 1.0 | Netscape ALL
Required product(s): Flash MX
Compatible product(s): Flash MX Professional 2004 , MX 2004 , MX

Reviews

0-0 of 0 reviews | Show all reviews


Add a review

(+) Please log in to submit a review