MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 319

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Example
In the following example, filtering is enabled on the DataSet object named
Suppose that each record in the DataSet collection contains a field named
following filter function returns
; otherwise, it returns
"management"
employee_ds.filtered = true;
employee_ds.filterFunc = function(item:Object) {
// filter out employees who are managers...
return(item.empType != "management");
}
See also
DataSet.filterFunc
DataSet.filterFunc
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSet.filterFunc = function(item:Object) {
// return true|false;
};
Description
Property; specifies a function that determines which items are included in the current view of the
collection. When
called for each record (transfer object) in the collection. For each item that is passed to the
function, it should return
item should not be included in the current view.
When changing the filter function on a data set, you must set the
and then
again in order for the proper
true
property won't generate the event.
filterFunc
Also, if a filter is already in place when the data loads in (
isn't applied until
Example
In the following example, filtering is enabled on the DataSet object named
specified filter function returns
otherwise, it returns
employee_ds.filtered = true;
employee_ds.filterFunc = function(item:Object) {
// filter out employees who are managers...
if the
true
false
is set to
DataSet.filtered
if the item should be included in the current view, or
true
is set to
filtered
false
if the
true
.
false
field in the current item is set to
empType
.
, the function assigned to this property is
true
event to be generated. Changing the
modelChanged
modelChanged
and then back to
true
field in each item is set to
empType
DataSet component (Flash Professional only)
employee_ds
. The
empType
false
property to
filtered
or
), the filter
updateAll
again.
employee_ds
"management"
.
if the
false
. The
;
319

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents