"Reprint" allows flash Professional CS4 or CS5 to have the ability to export SVG in batch with JSFL

Source: Internet
Author: User

A recent project requires bloggers to love my Love (love life = Love Technology) and convert all of the. Fla source files to. svg vectors, often after a search, found that the new version of Flash Professional cc already has this feature, But I am waiting for the machine is the old version of CS4.0, then how to do? The installation of CC requires too much change, the host is a 64-bit system, it is not possible to install a new system for this function. So then search, sure enough there is a solution, that is to install plug-ins! On GitHub, there's a project called Extensible, which has a JSFL library made for Flash Professional (extensible JSFL Library for Flash Professional:https ://github.com/davebelais/extensible/). Dave Belais's work greatly facilitates the progress of my project, and thanks to him here!

But his plugin is not entirely suitable for bloggers to love my Love (love life = Love technology) needs. Mainly because the project has a lot of. FLA source files, and after this plugin is installed, the SVG menu item will appear in Windows->other Pannels, and after opening, it is a panel that can adjust various output parameters-all of which indicates that all tasks cannot be handled automatically! This is not going to work, we have to find a solution. Export SVG, which appears in the Commands menu, is also unable to finalize the file. Helpless, can only study the source code of the great God, see if there is a glimmer of hope.

Here's a look at the results for everyone to share.

In the export SVG.JSFL file of the Commands menu, there are two short sentences:

if (!this.extensible) {fl.runscript (fl.configuri+ "JAVASCRIPT/EXTENSIBLE/INIT.JSFL");}
(function (EXT) {
Extensible.que.push (
New extensible. SVG ()
);
}) (extensible)

The description of the INIT.JSFL file is critical. This plugin is built on the extensible "Class" (Let's call it), and the extensible class is defined in the INIT.JSFL file.

1. Function extensible (options) {...} Defines the properties of this class.

2. Extensible.prototype={...} Defines the methods of the class.

3. Extensible.load ([...]) to load the plugin's other scripts in.

Now analysis, in the case of a FLA file opened, in the SVG panel can be successfully generated SVG file, and the Commands menu is not possible, there may be a lack of references to the file. So what is the mechanism for referencing files in extensible? You can find the definition of Set doc and get Doc, and the original return is Fl.getdocumentdom ().

Article Source: http://www.loverecorder.com/?p=5

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.