|
|
////////////////////////////////////////////////////////////////////////////////
//
// Arp: A Rich Internet Application Framework (http://osflash.org/arp)
// Copyright 2004-2006 Aral Balkan (http://flashant.org)
//
// Released under the open-source MIT license.
// (http://www.opensource.org/licenses/mit-license.php)
//
// See license.txt for full license terms.
//
////////////////////////////////////////////////////////////////////////////////
import mx.events.EventDispatcher;
/**
* <p><b>ArpForm is a lightweight form class with event dispatching for use
* in ActionScript 2 projects.</b></p>
*
* <p>It is basically a MovieClip with the EventDispatcher mixed in.
* If you require additional functionality, such as child form management,
* consider subclassing ArpForm or using mx.screens.Form.</p>
*
* <p>ArpForm is only for use in ActionScript 2 projects. For Flex
* projects, subclass either the mx.core.Application or mx.core.Form
* classes instead.</p>
*
* <p><i>Copyright © 2004-2006 <a href="http://flashant.org">Aral Balkan</a>.
* Arp lives at <a href="http://osflash.org/arp">http://osflash.org/arp</a>.
*
* Released under the open-source MIT license.
* (http://www.opensource.org/licenses/mit-license.php)
* See license.txt for full license terms.</i></p>
*/
class org.osflash.arp.ArpForm extends MovieClip
{
//////////////////////////////////////////////////////////////////////
//
// Properties
//
//////////////////////////////////////////////////////////////////////
// None
//////////////////////////////////////////////////////////////////////
//
// Constructor
//
//////////////////////////////////////////////////////////////////////
public function ArpForm()
{
EventDispatcher.initialize(this);
}
//////////////////////////////////////////////////////////////////////
//
// Public Methods
//
//////////////////////////////////////////////////////////////////////
/**
* Deprecated as of Arp 2.1. Use the visible field instead.
*
* @deprecated As of Arp 2.1, replaced by
* {@link #set visible(Boolean)}
*/
public function show()
{
_visible = true;
}
/**
* Deprecated as of Arp 2.1. Use the visible field instead.
*
* @deprecated As of Arp 2.1, replaced by
* {@link #set visible(Boolean)}
*/
public function hide()
{
_visible = false;
}
/**
* Sets/returns the visibility of the form.
*
* The visible implicit accessors were added for Flash MX 2004 Forms
* and Flash/Flex framework compatibility.
*
* These implicit accessors are synonymous with the older, deprecated,
* show() and hide() methods and should be preferred for any new
* development with ArpForms for easier migration to Flash MX 2004 Forms
* and Flex.
*
* @param state Whether or not the form is visible.
* @return Boolean Current visibility state of the form.
*/
public function get visible ()
{
return _visible;
}
public function set visible ( state:Boolean )
{
_visible = state;
}
//////////////////////////////////////////////////////////////////////
//
// Note: The following methods are mixed in at runtime
// by the EventDispatcher.
//
//////////////////////////////////////////////////////////////////////
/**
* Add a listener for a particular event.
*
* @param event the name of the event ("click", "change", etc)
* @param handler the function or object that should be called
*/
public function addEventListener(event:String, handler) : Void {};
/**
* Remove a listener for a particular event.
*
* @param event the name of the event ("click", "change", etc)
* @param handler the function or object that should be called
*/
public function removeEventListener(event:String, handler) : Void {};
/**
* Dispatch an event to all listeners
*
* @param eventObj an Event or one of its subclasses describing the event
*/
public function dispatchEvent(eventObj:Object) : Void {};
}
|