FlashDevelop Development Notes (1)

Source: Internet
Author: User
Reprinted from: http://blog.163.com/liu_huan820/blog/static/133497406200910280155383 4/
                  1. Customize the swf size and frame rate. The declared position must be in the package, before the class definition[SWF (width = 800, height = 216, backgroundcolor = 0 xffffff, framerate = 30)]           2. When you directly reference external images, videos, fonts, and other resources in the class, the format is
  • Image  Statement: [Embed (source = 'woshi.png ')]
                   Public var pic: Class;

                  Reference: Private var bm: Bitmap;

                             Bm = Bitmap (new
Pic ());

                               AddChild (bm );

  • SWF loading:

The same is true for swf loading. We select a file to import to the project.

Next we will create a component in swf and add it to the stage.

 

Font loading:

The font loading is slightly different. We import a font file to the project.

Here we create a TextField to use this fontName.

Note
Tf. embedFonts = true. It must be set to true to be valid. If it is not set to true, the font is the default font.

The method of resource embedding is very easy to use, but because the resources are compiled into the swf file, the published swf file will be much larger.

Liu_huan820

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.