Conflict between special effect display of dynamic text and file size

Source: Internet
Author: User
Tags file size

In the forum, I will see some people ask questions about dynamic text from time to time. The most important question is the transparency of dynamic text, rotation, masks, and other special effects, and file size after embedded characters.
In order to allow more people to better use dynamic text and avoid repeated posts in the forum, the author makes up his mind to write a dynamic text usage tutorial for the above issues.

Note:
1 The second floor mainly discusses the principle of text display, which is theoretically strong. If the reader only wants to solve the problem and make the desired effect, the content on the second floor can be skipped.
2. Solution to the problem, including display and file enlargement.
3. When the conflicts between the display and file size are well handled, the desired results may not work. Therefore, the fourth floor provides some alternative thinking methods and reference solutions.
4. What should I do if the replacement effect is poor? We will introduce a font editing software on the fifth floor to help you reduce the font file size and then embed it into flash.

Q: Why dynamic text cannot be transparent, rotated, or masked?
A: By default, when a static text is generated in Flash, the vector information of the text is saved to swf, this approach can avoid text display failures due to lack of fonts when files are obtained from other machines. dynamic text will not be processed in this way, because the text content is changed. If it is like static text, it is necessary to generate all the vector information of the text into Flash, this causes the file to become very large. therefore, by default, when dynamic text is used to display characters, Flash Player calls the font to display characters in real time from the system.
After the device font is called to Flash, only some dot matrix information is left, and no vector information exists (this is also the reason for text aliasing ). therefore, it cannot perform geometric operations like a graph, and cannot determine the shape of the rotated vector.



As to why it cannot be transparent, the author believes that transparent display also needs to calculate the color superposition between the transparent layer and the lower layer. As for the position where the display is located, it also requires support of vector information.



Then, the mask is also a special effect. It requires that the contour of the mask layer and the masked layer be superimposed to calculate the shape of the image. Therefore, the dynamic text displayed in the device font cannot be used.
Q: How can this problem be solved?
A: A simple method. after dynamic text is selected, click the "character" button on the property panel and select "all characters. this is because the vector information of the font is actually embedded, so special effects can be processed.
Q: The problem above is solved, but the generated file is very large (several MB to a dozen MB). How can this problem be solved?
A: As mentioned above, the embedded font is actually the vector information of the font. If you embed all the characters, you actually put the entire font file in the swf file.
If you are using, you can perform the following operations:
Open the control panel of the system, and double-click "font" to enter



Find "" and check the file size. Your swf will be increased accordingly (the size of the file on the author's machine is 10 MB. Therefore, after embedding the font outline, swf will be larger than 10 MB.



Q: It is very impractical to put such a large Flash on the internet. What should I do if I want to make it smaller?
A: This requires a detailed analysis of the problem.
Q: My dynamic text must contain numbers. What should I do?
A: You can select the "character" option as shown in the following figure. In this way, the swf file only has 10 more vectors, and the file will not be much larger.



Q: Now I want to create a navigation menu with dynamic text setting labels and special effects for dynamic text. How can I do this?
A: as a navigation menu, your columns are generally fixed. Therefore, you can set the outlines of words embedded in your menu items (see the figure below)



In this way, the next time you want to update the column, open the source file, change the text value, and change the embedded font outline accordingly.

Q: But more often, you need to load the text, and the content is not known at all. It is like this:



I really don't know the content of the lyrics I loaded, and I don't know whether there are English or Japanese, and I also need the effect of the mask. How can I achieve the effect, does not increase the file size?
A: Although masks cannot be used, they can be covered. In This lyrics player, only the following red-marked areas are available.



Therefore, draw two rectangles with the same background color in the red area to cover the dynamic text.
Q: If the background is complex, not a single color, and there may be multiple layers, isn't it difficult to process them? If the background is changed or dynamic text needs to be moved, isn't it difficult to change it? Can this problem be solved?
A: In this case, it is recommended that you convert the background part into a component, then put the text on the background layer, and put another layer on the text layer. The content is the same as that on the background layer, and put another layer on the background layer, used to mask a background layer. the shape is the shape of the red area (the final effect is shown in the figure below)



If you want to change the background, you can directly modify the background element. If you want to move the text, you can move the text and the mask together for ease of operation.
Q: What should I do if I want to display all the characters in the same way as above?
A: assume that dynamic text is used to achieve this effect.

[Upload = gif] UploadFile/2005-11/20051118165451450. gi

Is it necessary to embed the font outline to implement it?
The answer is No.
This effect is implemented by the author using Flash. You may think that it is implemented using Alpha complement. in fact, the author uses the tone compensation, the first frame of the color is white, the last frame of the color "none", the text itself is red.
This shows that, when the background is solid, the color can be used to replace Alpha. Although the color is a special effect, it is actually only a combination of colors, and the result shows a single color for the text, you can call the device font to display it. therefore, in this case, you can replace the transparent effect with the color effect to avoid embedding the font contour.
However, if the background is a complex image or gradient color, and multiple color blocks are formed, you must use transparency. if you want to avoid embedding the font contour, we suggest using some alternative effects. I will introduce some reference solutions for the alternative effects later.
Q: Can rotation be solved?
A: As rotation fundamentally changes the dot matrix distribution (if the device font is used), vectors must be used, that is, embedded characters. Therefore, I will provide some alternative effects.
Q: It doesn't seem to work either. How can this problem be solved?
A: skew is actually a combination of scaling and rotation, so it also requires a font profile (

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.