I recently started to use flex builder. Developers are still comfortable with this. The flex framework has powerful functions. It is useless for Ria applications, but it is not very useful for game development. In addition, it generates about KB of SWF files. Therefore, I decided to create only the ActionScript project. Then the problem comes...
Flash has a class called Fl. transitions. Tween, which is convenient for scaling or fade-in and fade-out effects. However, this type cannot be used directly in flex. Some people said that MX. effects. Tween can be used in flex, but this class can only be used in flex projects. Why can't so many convenient classes in Flash be used? Is it hard to write special effects by yourself? Try again!
Finally, an awflasher article showed me hope again.ArticleThe example in shows how to use the Flash CS3 control in the flex ActionScript project. After some small experiments, I finally found a solution:
1. Use Flash CS3 to create a new FLA file named fltween.
2. Write the following in the first frame:Code:
Import Fl. transitions. Tween;
VaR TWEEN: tween;
3. File-> export video-> Save-> select export SWC-> OK to generate a fltween. SWC.
4. in Flex builder 3, right-click your project root directory and choose Properties> ActionScript build path> library path> Add SWC> select the generated fltween. SWC file.
5. Next, you can import Fl. transitions. Tween; in the code.