简体   繁体   English

如何通过jsfl在Flash的库中更改Item的“组件定义”?

[英]How to change Item's “Component definition” in library in Flash by jsfl?

I want to change "Component definition"(I don't know what is in English version's Flash) of Item in library. 我想在库中更改Item的“组件定义”(我不知道英文版的Flash是什么)。

Item is a simple MC or Component.A MC will be changed into Component by add Component definitions. Item是一个简单的MC或Component.MC将通过添加Component定义更改为Component。

The place to add "Component definition" like this 像这样添加“组件定义”的地方 图片

Sorry, I'm using Chinese version. 抱歉,我正在使用中文版本。

So I have learnt JSFL and there is parameter Object can change existed parameter of Element in timeline.But it can reach "Component definition" in Item.Doc says it is AS 2.0 Array.And I can also find it in AS 3.0. 因此,我学习了JSFL,并且有一个参数Object可以更改时间轴上Element的现有参数。但是它可以在Item.Doc中达到“组件定义”。Doc说它是AS 2.0 Array。我也可以在AS 3.0中找到它。

But I only want to know how to add parameters in item by JSFL.

Thanks!!! 谢谢!!!

Finally ,I did all I can do to find out that there is noly a way to achive it. 最终,我做了我所能做的一切,发现没有办法实现它。

1.Create an empty .xfl file in your extendsion. 1.在扩展中创建一个空的.xfl文件。
2.Use jsfl to open it when user want to add "Component definition" of items in library. 2.当用户要在库中添加项目的“组件定义”时,请使用jsfl将其打开。
3.Use jsfl copy the item into .xfl and save the .xfl. 3.使用jsfl将项目复制到.xfl并保存.xfl。
4.Go to .xfl saved folder and find the item's .xml you want edit.Read the .xml file and edit the "Component definition".Then save the .xml. 4.转到.xfl保存的文件夹,找到要编辑的项目的.xml。读取.xml文件并编辑“组件定义”。然后保存.xml。
5.Reopen the .xfl you can find the "Component definition" has been changed. 5.重新打开.xfl,可以发现“组件定义”已更改。
6.Copy the changed item to user document(.fla),it can replace the old one. 6.将更改的项目复制到用户文档(.fla)中,它可以替代旧的项目。

The 6 steps above just need jsfl and a empty .xfl in your extendsions or save in the location that you can find it on run time. 上面的6个步骤在扩展中只需要jsfl和一个空的.xfl即可,或者保存在可以在运行时找到它的位置。

I had thought that why Adobe didn't give me a simple API to change the "Component definition" just like what I do in Flash.exe? 我曾经想过,为什么Adobe不像我在Flash.exe中那样给我一个简单的API来更改“组件定义”?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM