是否可以使用目录结构中位于 FLA 之上的 Document 类?
-
13-09-2020 - |
题
是否可以使用目录结构中位于 FLA 之上的 Document 类?
如果是这样,请解释一下如何。
这就是我目前的目录结构:
[d] site
│
├─[d] as3
| |
| ├─ Site.as //Document class for site.fla
| ├─ SectionA.as //Document class for section_a.fla
| └─ SectionB.as //Document class for section_b.fla
|
├─ site.fla
├─ section_a.fla
└─ section_b.fla
我想这样做:
[d] site
│
├─[d] as3
| |
| ├─ Site.as //Document class for site.fla
| ├─ SectionA.as //Document class for section_a.fla
| └─ SectionB.as //Document class for section_b.fla
|
├─[d] swf
| |
| ├─ section_a.fla //Document class for this is above it in the directory structure
| └─ section_b.fla //Document class for this is above it in the directory structure
|
└─ site.fla
谢谢!
解决方案
当然这是可能的。您只需将该目录添加到 Fla. 中的类路径列表中即可。
(在电脑上)前往 File > Publish Settings
.
然后单击 设置 按钮旁边的 ActionScript version
落下。
通过单击小图标添加您的类目录 plus sign
(+) 按钮。您可以手动输入相对路径,或者单击小 target
按钮浏览目录。在这种情况下,您只需手动输入 - ./as3/
作为你的班级路径
只是一个注释。最佳实践是将类放在子目录中,但该目录通常称为 src
. 。通常您将 SWF 发布到名为 bin
.
不隶属于 StackOverflow