There are many improvements to the flex SDK and components in flex3, and many new classes/components/functions are added. for example, advanceddatagrid, new collection class, deep Link Interface (browsermanager), Resource Package, dynamic localization, and support for the flex component kit for flash cs3. these new functions enhance the integration with Ajax, provides advanced visual effects and complex resource management and localization.
Advanceddatagrid:
The advanceddatagrid component allows you to set complex views for hierarchical data and table data. The new collection class is used to represent these new types of data. At the same time, some helper classes are provided to divide columns into several groups, and summaryobjects and summaryrows are provided. The following are the newly added collection classes.
MX. Collections. hierarchicaldata
MX. Collections. Grouping
MX. Collections. groupingcollection
MX. Collections. groupingfield
MX. Collections. hierarchicalcollectionview
MX. Collections. hierarchicalcollectionviewcursor
MX. Collections. listcollectionview
MX. Collections. summaryfield
MX. Collections. summaryobject
MX. Collections. summaryrow
Below are some pictures of advanceddatagrid.
Deep linking)
Flex3's deep link component (browsermanager) provides the ability to manage data in URLs. It is implemented through HTML Achor. The browsermanager class can bind the flex program to the URL and listen for URL changes. This feature allows flex to be continued through URL, and provides a new method to input parameters to the flex program. The newly added classes include
MX. Events. browserchangeevent;
MX. Managers. ibrowsermanager;
MX. Managers. browsermanager;
MX. utils. urlutil;
Application. historymanagementenabled
The coolest thing about this feature is that you can use it on many other occasions. For example, you can use it to synchronize the status of the URL and flex program.
Deep link 1
Deep link 2
Resource Packages and dynamic localization
The mxml compiler can create resource package files (SWF files ). These resource packages can be generated from the java. properties file using a property table similar to the following.
Yes_label = Yes
Date_format = mm/DD/YYYY
Age_of_consent = 16
Some_flag = true
The data is compiled into objects in the SWF file. They are compressed and can be quickly loaded. The most important thing is that the generated data can be dynamically created and loaded into ResourceManager. Use the following
// Createa resource bundle in as3 and add to Resource Manager
VaR newbundle: resourcebundle = new resourcebundle ("fr_fr", "mybundle ");
Newbundle. content ["open"] = "ouvrir ";
Newbundle. content ["close"] = "Ferme ";
ResourceManager. addresourcebundle (newbundle );
The resource package provides support for program localization. You can create Resource Packages in multiple languages to switch between them dynamically.
It is easy to bind resources to a program. When writing a program, if you bind the value to the resource package, all strings in the resource package will be compiled and loaded.
Bind to resource package
. 5
Read the data of the belt type from the resource package using ActionScript 3
Foobundle. getnumber ("age_of_consent ")
Load a resource package from a URL
ResourceManager. loadresourcebundles (URL );
Flex component kit for Flash CS3:
Flexcomponent kit for Flash CS3 has been released. Flex3 improved it and added support for containers and various animations.
Sample
This article from: http://www.flexcoders.cn/showtopic-697.aspx