In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the example analysis of the use of flex, which is very detailed and has a certain reference value. Friends who are interested must read it!
How does Flex work
The content of this part of the document is to provide users with a quick overview of how Adobe?Flex works. Through the study of this chapter, you can create your Flex application and compare it with the Web development technology you are familiar with in order to understand the meaning and essence of Flex.
Section * build and run Flex applications
Flex in the Flex Learning Manual is an architecture that provides development, design and operational support, which enables developers to create and utilize Adobe?
Flash?Player9 serves as the "rich client Internet application / richInternetapplications/RIA" in the foreground to meet users' more intuitive and interactive online experience.
Typical steps for ◆ to develop Flex applications are as follows (usually like this):
1. Select a series of pre-customized components (such as tables, buttons, etc.) that are used to design the application interface
two。 Lay out components to design the user interface.
3. Use styles and themes to enhance visual design.
4. Add dynamic behavior (such as interactions between program components).
5. Define and connect the required database services.
6. Compile the source code into a SWF file and run it in FlashPlayer.
A typical Flex application in the ◆ Flex Learning Manual includes the following elements:
1.Flexframework
Adobe?Flex2framework contains all the components needed to create a RIA: containers for application layout planning; controls for the user interface and getting data from the user (such as text boxes and buttons); widely supported data binding, data formatting, and valid value validation; and event-driven development patterns. Flexframework is included in the common component library (SWC) file.
2.MXML
Each Flex application contains at least one MXML file, which is used as the main file of the program. MXML is a markup language that is based on an implementation of XML and is used to create Flex applications. You can use it to declare the definition of the tag structure used in the program.
3.ActionScript3.0
You can use ActionScript3.0 to add dynamic behavior to your application, which is an implementation based on ECMAScript, similar to JavaScript. You can add ActionScript as a script block directly in the MXML file, or you can create a separate ActionScript file and import them into the MXML file.
4.CSS
You can change the visual style of components (buttons, list boxes, etc.) by setting the properties of the component.
For example, the button component has a fontFamily property that you can use to set fonts. There are usually four ways to control the properties of a style: through a theme (theme); by defining it in a CSS file; in a style block in a MXML file; and by setting it in an instance of a component.
5. Graphic resources
Like many applications, Flex contains a variety of graphic resources, such as icons and images.
6. data
Some components are used for data display (combobox or datagrid) work. At the same time, you can associate these components with data in a variety of ways, such as using arrays, collecting objects, data models, and external XML data resources, and so on.
How Flex applications are compiled and released:
In the Flex Learning Manual, the Flex application is compiled into a SWF file and then run under FlashPlayer. When a source code is compiled, it is converted to an ActionScript class and incorporated into an SWF file with graphics and other resources. This is one of the essence of Flex. At run time, SWF files interact with the required external libraries, services, and data sources.
General Flex applications do not need the support provided on the server side. Therefore, you can compile them on your local computer and publish them to your users in the HTML page of the Web service.
Of course, you can also combine Flex with Adobe?FlexDataServices2, ColdFusionFlashRemotingService, or other Java and J2EEService server technologies to carry out the network application program of Bax S structure.
The development of preface.
MXML: where it all started
You can use the components provided by Flex to define the user interface in MXML. Here is an example of the main MXML program file:
If you are already familiar with XML, you can recognize the format of this example at a glance. The first two lines of the MXML code contain the version number, code, and namespace information, and the body of the document contains the details of the program.
All the details of the Flex application are placed in tag pairs. At the same time, you can also nest other child tag pairs in the parent tag pair.
This example creates a simple program that displays "SayhellotoFlex!" on the screen. The words. In this program, the TextArea and Button components are declared and their corresponding text and label properties are set.
Note: each tag in the MXML file has the prefix mx, which is the design namespace for Flex.
The above is all the contents of the article "sample Analysis of flex usage". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.