In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to use Flex behavior, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
First, use MXML to create Flex behavior
Next we will create an effect that the button will glow when the user clicks the button.
1. In Source mode, enter the following code later to define a glowing effect.
2. In Design mode, drag a button from the Componsents panel to the application and set the properties of the button as follows:
ID:myButton
Label:View
X:40
Y:60
3. In the properties panel, click the ViewbyCategory view button. And find out the properties of the Effects type.
4. Assign mouseUpEffect to the glowing effect.
MouseUpEffect: {buttonGlow}
In Source mode, the tag code is as follows:
5. Save the file.
6. Click the Run button on the toolbar to compile the application.
The browser will run your Flex application. Click the View button. The View button performs the glowing effect of the label.
Second, the effect of Flex behavior calling between different components
Next we will make a Label component that will show a set of numbers from blurred to clear when the user clicks the button.
1. In Design mode, drag a Label component from the Components panel into the application and set the Label property as follows:
ID:myLabel
Text:4815162342
X:40
Y:100
two。 Switch to Source mode, define the blur effect, and enter the following code under the tag:
3. Specify the Label component in the label as the target component for the blur effect:
4. Specify the click event as a blur effect in the label:
5. In the tag, set the visible attribute to false to hide the Label component:
6. When the user clicks the View button, set the visible property of the Label component to true to display the Label component:
7. Save the file.
8. Click the Run button on the toolbar to compile the application.
The browser will run your Flex application. When you click the View button, a set of numbers changes from blurring to clarity.
Third, the creation and synthesis effect of Flex behavior
Next we will make a position where the Label component will appear a set of numbers from blurred to clear when the user clicks the button and the Label component will move the 20px from the top down.
1. In Source mode, enter the code before the tag.
two。 Cut the whole sentence label to the front. Will be the child tag of.
3. Tab, select target= "{myLabel}" and cut into.
4. Define the movement effect. Enter the code after the label, and the Label component will move the position of the 20px down in 2 seconds.
5. In the tab, the effect of changing the click event is set to BlurMoveShow.
6. Save the file.
7. Click the Run button on the toolbar to compile the application.
The browser will run your Flex application. After clicking the View button, a set of numbers changes from blurred to clear and moves down.
Thank you for reading this article carefully. I hope the article "how to use Flex behavior" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.