Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact |

Confirm

Package:
Class:
Inheritance:
biz.flashscript.components.alert
public class Confirm
N/A
The Confirm class is useful for forms. When a textbox is not filled or a string variable is null, a default AlertBox instance is opened. Further, all component buttons or ComboBox instances will be inactivated until cleared. To create an instance of the Confirm class use the constructor new Confirm().

See also

   biz.flashscript.components.alert.AlertBox

   biz.flashscript.components.alert.CallAlert

Public Methods
Method Defined By
Confirm(myData:Object, myTarget:Object, label:String)
Creates a new instance of the Confirm class.
Confirm
Constructor Detail
Confirm ()  Constructor
public function Confirm(myData:Object, myTarget:Object, label:String)
Intializes a new Confirm instance.

Parameters

  • myData:Object ____ The data to be added by a user, for example filling out a input TextField.
  • myTarget:Object ____ The timeline to be blurred and inactivated.
  • label:String ____ Specifies the label for the AlertBox component instance.
Examples
Create a new fla file and name it Confirm.fla. Place the fla in the same folder as the biz folder. Add component button and ComboBox instances on the main timeline. Name one button "mySubmit". Then create an Actionscript file, name it Confirms.as and place this script. You should see an AlertBox instance popping up and the background blurred and the component instances inactivated. Test the movie again by giving the String a value.
package 
{
	import flash.display.Sprite;
	import fl.controls.Button;
	import fl.controls.ComboBox;
	import flash.events.MouseEvent;

	import biz.flashscript.components.alert.Confirm;

	public class Confirms extends Sprite
	{
		private var myVar:String;//="confirmed";// a string from a textfield for example, here null.

		public function Confirms ():void
		{
			mySubmit.addEventListener (MouseEvent.CLICK,confirmData);
		}
		private function confirmData (e:MouseEvent):void
		{
			var ca:Confirm = new Confirm(myVar,clip,"Enter data!");
		}
	}
}