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