In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the commonly used Flex effect components, which have 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 know about it.
Simple Flex effects component
A wealth of effects components are available in Flex. Because Flex effects are a gradual process based on time, all effects have the duration property, which sets the playback time in milliseconds. You can also control the number of times the effect is played and the interval between repeating the effect (in milliseconds) by setting the repeatCount property and the repeatDelay property, respectively. If you want to delay calling the effect for a period of time after the trigger is triggered, you can use the startDelay attribute.
1) AnimateProperty animation effect
An AnimateProperty in a Flex effect is an effect used to animate the properties or styles of a component. We can use its property property to set the properties on the target object that need to be animated, and then set the fromValue property and the toValue property to provide the start and end values of the property for the effect. For example, the following code uses a mouseDownEffect trigger, which triggers the AnimateProperty effect when a picture is clicked. Within 1 second, the scaleX property of the Image object changes from 1 to 2 and is stretched horizontally. The code is as follows:
If you want to set the effect through style, you can set the isStyle property to ture, and then style the target object through the setStyle () method to achieve the purpose of setting the effect.
2) Blur blur effect
Blur is a blur effect in the Flex effect. This effect uses the flash.filters.BlurFilter filter, and if you apply the Blur effect to a component, you can no longer apply the BlurFilter filter to that component, nor can you apply the Blur effect again. The following code triggers the Blur effect through the mouseDownEffect trigger of the Image object, and the Image object gradually becomes blurred within 1 second. The code is as follows:
3) dissolution effect of Dissolve
Dissolve is a kind of dissolving effect in Flex effect. When the effect starts playing, an opaque rectangle is created, suspended above the target component, its color is set by the Dissolve.color property, and the transparency is "1.0-Dissolve.alphaFrom". As the effect plays, the alpha property of the rectangle will gradually change from (1.0-alphaFrom) to "1.0-alphaTo" until the effect is played and the rectangle is destroyed.
If the target object is a container, the Dissolve effect is applied to the content area inside the container.
The following code uses a CheckBox object to set the visible property of Image, triggering their respective Dissolve effects through hideEffect and showEffect triggers, respectively:
4) Fade fade in and out effect
Fade in the Flex effect is a fade-in and fade-out effect, which animates by setting the alpha property of the component. When setting the Fade effect with showEffect or hideEffect triggers, if the values of the alphaFrom and alphaTo properties are omitted, the transparency of the target object changes from 0 to the current alpha value of the target on the showEffect trigger, and from the current alpha value to 0 on the hideEffect trigger. If you want to use the Fade effect for fonts, you must use embedded fonts.
The following code uses a CheckBox object to set the visible property of Image, triggering their respective Fade effects through hideEffect and showEffect triggers, respectively:
Thank you for reading this article carefully. I hope the article "what are the commonly used Flex effect components" shared by the editor will be helpful to you. 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.