How to Make flex builder 3 and flash cs4 work together

Source: Internet
Author: User
What are the strengths of flex builder3? Code The strength of Flash is the preparation of the front-end interface. How to combine these two advantages to write code in flex builder and then import it to flash cs4, the products used in this article are flex builder3 and Flash CS 4. Use flex builder 3 to create a SWC class library.

Create a new Flex library project and a new class flashclass

Package
{
Import flash. display. movieclip;
Import flash. display. shape;
Public class flashclass extends movieclip
{
Public Function Flashclass ()
{
VaR Child: Shape = New SHAPE ();
Child. Graphics. beginfill ( 0xff3355 );
Child. Graphics. drawrect ( 50 , 100 , 200 , 100 );
child. graphics. endfill ();
addchild (child );
}< P>

}< BR >}

Code

when saved, flex automatically generates the SWC file

open the flash cs4, create a FLA file, open the window and choose Properties> Configuration File> Edit> SCRIPT> Settings> library path> plus sign to navigate to the folder where the SWC file is located, or the SWC file can be

and then write down

var flexobj: flashclass = new flashclass ();

addchild (flexobj );

If the written class is in the package, the corresponding namespace should be introduced.

If You Want To apply the flash components in flex, you only need to export the components as SWC files through flash, then you can add the library path to the flex project.

PS: I used flash cs4 and flex builder 3 both in dashboard.

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.