简体   繁体   English

将Flash Professional库链接到Flash Builder

[英]Linking Flash Professional Library Into Flash Builder

I am currently working on an in-progress project using Flash Professional and Flash Builder. 我目前正在使用Flash Professional和Flash Builder进行一个正在进行的项目。 Before I began work, the project was already partially completed by another tech in both Professional and Builder--code written, timeline set, linkage created, etc. However, now that I'm on the project, I'm trying to set up the projects on my computer, but I can't seem to get Flash Builder to see the library provided by Flash Professional. 在我开始工作之前,该项目已经由Professional和Builder中的另一项技术部分完成,包括编写代码,设置时间线,创建链接等。但是,现在我在项目中,我正在尝试设置我计算机上的项目,但我似乎无法让Flash Builder看到Flash Professional提供的库。

Code meant to access library items and import statements of packages like fl.controls are giving the "import could not be found" and "Type was not found" errors typically symptomatic of items missing from the library in Professional. 旨在访问库项目和fl.controls之类的包的导入语句的代码给出了“找不到导入”和“找不到类型”错误,通常是Professional中库中缺少项目的症状。 However, I can verify that the items are there, they are linked to AS3 and set to be edited in Flash Builder. 但是,我可以验证项目是否存在,它们已链接到AS3并设置为在Flash Builder中进行编辑。 Moreover, I can compile the project through Flash Professional and everything will work without a problem, which is not true of compiling through Builder. 而且,我可以通过Flash Professional编译项目,并且一切都会正常运行,而通过Builder编译并非如此。

On the Builder side of configuration, I can verify that the project I am using has the correct path to the .fla file, and I know by looking at the other tech's configuration that I have all of the necessary SWC exports set up. 在配置的Builder端,我可以验证我正在使用的项目是否具有指向.fla文件的正确路径,并且通过查看其他技术的配置可以知道我已经设置了所有必要的SWC导出。

What am I missing to get the linkage configured correctly? 要正确配置链接,我缺少什么?

I hope I've understood your problem correctly. 希望我已正确理解您的问题。

Here is how I use symbols from a .swf file in my Flex application : 这是我在Flex应用程序中使用.swf文件中的符号的方式:

package {
    public class Assets {
        [Embed('assets/Pref.swf', symbol='spades')]
        public static const SPADES:Class;

        [Embed('assets/Pref.swf', symbol='clubs')]
        public static const CLUBS:Class;

        [Embed('assets/Pref.swf', symbol='diamonds')]
        public static const DIAMONDS:Class;

        [Embed('assets/Pref.swf', symbol='hearts')]
        public static const HEARTS:Class;

        [Embed('assets/Pref.swf', symbol='kuku')]
        public static const KUKU:Class;

        [Embed('assets/Pref.swf', symbol='train')]
        public static const TRAIN:Class;

        [Embed('assets/Pref.swf', symbol='waggon')]
        public static const WAGGON:Class;
    }
}

and then: 接着:

        var sprite:Sprite = new Assets[mcName];
        addChild(sprite);

or: 要么:

        private static const WAGGON:Sound = new Assets.WAGGON;
        private static const TRAIN:Sound = new Assets.TRAIN;

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

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