MACROMEDIA FLASH 8-USING FLASH Use Manual page 442

Using flash
Table of Contents

Advertisement

Schema data types
A data type is an object that represents all the runtime logic needed to support a particular
data type. A data type can be a scalar type, such as integer, string, date, currency amount, or
ZIP code. It can also be a complex type, with subfields and so on. A data type can test a data
value to determine if it is valid for that data type. The following data types come with Flash
MX Professional 2004 and Flash Professional 8:
Array
No validation options.
Attribute
XML attribute. No validation options.
Boolean
No validation options.
Custom
Lets you add a custom class to check for this special kind of validation. Your code
should call the validate function when the field is assigned a new value, inspect the value, and
determine whether it's valid. If it is, the function should simply return. If not, the function
should call
this.ValidationError("some informative message");
must be in the classpath and formatted as shown in the following example:
class myCustomType extends mx.databinding.CustomValidator {
function validate(value) {
... some code here
}
}
DataProvider
No validation options.
Date
No validation options.
DeltaPacket
No validation options.
Integer
A validation option can be set up to define the minimum and maximum values.
Number
A validation option can be set up to define the minimum and maximum values.
Object
No validation options.
PhoneNumber
No validation options.
SocialSecurity
No validation options.
String
A validation option can be set up to define the minimum and maximum number of
characters.
XML
Lets you specify if white space should be ignored when a string is converted into
XML.
ZipCode
No validation options.
The following data types can perform validation: Custom, Integer, Number,
PhoneNumber, SocialSecurity, String, ZipCode. The following data types can convert
from various other data types when you assign to them: Boolean, DataProvider, Integer,
Number, String, XML.
442
Data Integration (Flash Professional Only)
. The custom class

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents