Use the flash tween class in the ActionScript project of flex builder 3

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.