topical media & game development
actionscript-book-AlarmClock-com-example-programmingas3-clock-AlarmEvent.ax
actionscript-book-AlarmClock-com-example-programmingas3-clock-AlarmEvent.ax
[swf]
flex
package
{
import flash.events.Event;
This custom Event class adds a message property to a basic Event.
public class @ax-actionscript-book-AlarmClock-com-example-programmingas3-clock-AlarmEvent extends Event
{
The name of the new @ax-actionscript-book-AlarmClock-com-example-programmingas3-clock-AlarmEvent type.
public static const ALARM:String = "alarm";
A text message that can be passed to an event handler
with this event object.
public var message:String;
Constructor.
parameter: message The text to display when the alarm goes off.
public function @ax-actionscript-book-AlarmClock-com-example-programmingas3-clock-AlarmEvent(message:String = "ALARM!")
{
super(ALARM);
this.message = message;
}
Creates and returns a copy of the current instance.
@return A copy of the current instance.
public override function clone():Event
{
return new @ax-actionscript-book-AlarmClock-com-example-programmingas3-clock-AlarmEvent(message);
}
Returns a String containing all the properties of the current
instance.
returns: A string representation of the current instance.
public override function toString():String
{
return formatToString("@ax-actionscript-book-AlarmClock-com-example-programmingas3-clock-AlarmEvent", "type", "bubbles", "cancelable", "eventPhase", "message");
}
}
}
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.