Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the eight new features of FlexSDK4?

2025-02-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "what are the eight new features of FlexSDK4". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "what are the eight new features of FlexSDK4?"

New features of FlexSDK4

New features of FlexSDK4 I. theme

Before FlashBuilder4, the default theme for Adobe was Halo, while starting with FlashBuilder4, the default theme became Spark. FlashBuilder4 contains nine default themes, including two Spark themes and seven Halo themes.

There are two sets of controls in FlashBuilder4: the previous mx.* and the newly added spark.*.

How to choose a Flex theme for a project?

Create a new Flex project, right-click the project, select "Properties", select "Flex theme" on the left side of the pop-up dialog box, and then you can see the Flex theme that comes with FlashBuilder. We see that there are two sets of Flex themes, namely: Spark and Halo. You can delete the theme, import the theme operation, etc., after the selection, click "OK", and then switch the Flex theme for the project.

Note: 1. The default location of the theme is in the FlashBuilder4 installation directory / sdks/4.0.0/frameworks/themes/

two。 You can see the configuration of the project theme in the .actionScriptProperties file in the newly created Flex project.

Flex topic is in-depth

We can take a look at what's in the theme package, such as renaming the wireframe.swc in the theme package to wireframe.zip and decompressing it. After decompression, you can see the following files.

Obviously, default.css is the styling of the theme, and we can modify it to change the configuration of the theme.

New features of FlexSDK4 II. Layout

In Flex4, the layout has been stripped out of the control. In this way, we can layout the controls more flexibly, such as changing the layout of the container from horizontal to vertical at run time. This is very difficult to achieve in Flex3.

In Flex4's spark package, there is no original Hbox,Vbox,Box and Canvas container, replaced by Group, another new container is SkinnableContainer, the difference between it and Group is that we can define skin, Group can not define skin, but has higher execution efficiency and makes the application smaller.

In addition to the change in the layout of the control, the scroll bars in Flex4 are also stripped out of the control, and the default container does not have scroll bars and virtualization.

New features of FlexSDK4 III. Special effects

The special effects in Flex4 inherit from the Animate class, and Animate inherits from the Effect class.

New features of FlexSDK4 IV. Style

In Flex4, support for Css has taken a qualitative leap. Before Flex4, Flex's support for Css was very awkward, compared to HTML's powerful Css function, Flex can only be said to inherit a very superficial part.

Support for namespaces has been added to the new styling in Flex4, which focuses on styling controls in different control packages. For example:

@ namespaces "library://ns.adobe.com/flex/spark"; @ namespacemx "library://ns.adobe.com/flex/halo"

What's New in FlexSDK4 V. Status

State will become more flexible and easy to use in FlexSDK4.

Only one set of state is defined in the States array, and no other tags appear.

New features of FlexSDK4 VI. Bi-directional binding

A very useful function in Flex is data binding, for example, we have attribute a, and input box b, we can bind attribute a to input box b, so that when the value of an is changed, the value of input box b will change accordingly. This binding is monomial. Before FlexSDK4, there was no direct two-way binding, so it was troublesome when we wanted to change a by setting the value of b in reverse. Flex4 provides us with a method of two-way binding.

Note: two-way binding cannot be used in styles, special effects, data services, and remote objects.

New features of FlexSDK4 VII. ASDoc

ASDoc is a tool for generating code specifications, which can automatically convert the comments we write in the program into descriptions of control properties, methods, etc. So if we write the comments of the custom control very regularly, we can generate a manual of the control with a simple command.

New features of FlexSDK4 8. SWFObject and HTMLTemplate

In each Flex4 project, there is a html-template folder with the following contents:

1. First, take a look at the contents of the history folder.

History.js,history.css and historyFrame.html are used to record the address of each state in the Flex program, for example, when we switch from state1 to state2, it saves the browser address of the corresponding state for us. If we activate the option to allow inheritance of browser navigation features in the project, that means that we can:

1) return to the state visited in the program by moving forward and backward.

2) Save the address of a state into your favorites, and later you can open the state page directly through the address.

3) give the address of a state to others, and they can link directly to the states page.

In other words, if our entire program tries to switch using state, then we can access any specified page of our program in the browser as if we were browsing a normal web page.

2.html-template and swfobject

The role of html-template is to generate a Html page when the build project is compiled, and the user accesses the program by visiting the Html page, rather than directly accessing the generated swf file. Why not access the swf file directly? Because html-template does a lot of other things for us besides displaying the swf program, such as:

1) reference history series files to support browser navigation.

2) check the user's Flashplayer version and install it automatically with one click.

3) Page title, coding, width, program quality, etc.

Before Flex4, a section of javascript was directly added to the html-template file to achieve the above functions, while starting from Flex4, swfobject2 was officially introduced, which is an open source standard library for embedding swf into html pages and implementing some other functions.

These are all the contents of this article entitled "what are the eight new features of FlexSDK4?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report