In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to use common Flex effect components. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Flex effect 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 invoking the Flex effect for some time after the trigger is triggered, you can use the startDelay attribute.
1) Glow luminous effect
Glow is a glowing effect in the Flex effect, which uses the flash.filters.GlowFilter filter class. If you apply the Glow effect to a component, you cannot apply the GlowFilter filter to that component, nor can you apply the Glow effect again. The following code triggers the Glow effect through the mouseDownEffect trigger of the Image object:
2) Iris rainbow effect
In the IFlex effect, the ris effect animates the effect target by expanding or shrinking a rectangular mask focused on the target. This effect can show the target by zooming in the mask from the center of the target, or you can shrink the mask to the center to hide the target. The following code uses a CheckBox object to set the visible property of Image, triggering their respective Iris effects through hideEffect and showEffect triggers, respectively:
3) Move mobile effect
The Move effect in the Flex effect is used to achieve mobile animation. Within a given time, the location of the component changes over time. The following attributes are usually required to use this effect.
The lxFrom and yFrom properties are used to specify the initial location.
The lxTo and yTo attributes are used to specify the target location.
LxBy and yBy are used to specify the amount of movement, that is, the speed at which the component moves in the x-axis and y-axis.
Typically, you only need to specify any two of these values, the initial position, the target position, or the amount of movement, and Flex calculates the third value. If you specify all three values, Flex ignores the xBy and yby values. If you specify only xTo and yto values or xBy and yby values, Flex sets xFrom and yFrom to the current position of the object.
The following program demonstrates how to use the Move effect.
Code listing MoveSample.mxml
In the code, set the layout property of Application to absolute. When the user clicks the mouse anywhere in the application, the moveImage method is called. In this method, the Move effect is stopped first, and then the target location is set according to the location of the mouse click, and the effect is played.
Move effects are usually applied to containers that use absolute positioning (such as Canvas) or containers that use "layout=absolute" (such as Application or Panel). If you need to apply it to an automatically laid out container, such as a VBox or Grid container, although the target object is moved, the next time the container updates its layout, it moves the target object back to its original location. In this case, you can set the container's autoLayout property to false to prevent moving back, but this disables the layout of all controls in the container.
4) Pause pause effect
In the Flex effect, the Pause effect can achieve the function of not performing any operation within a specified period of time. If you add the Pause effect as a child of the Sequence effect, you can create a pause between 2 other effects.
This is the end of this article on "how to use common Flex effects components". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.