问题在Flash Professional中使用Flex SDK(有关的as3corelib) [英] Issue Using Flex SDK in Flash Professional (for as3corelib)

查看:254
本文介绍了问题在Flash Professional中使用Flex SDK(有关的as3corelib)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现迈克·钱伯斯的as3corelib寻找各种方法来呈现在舞台上的文件时。我在Flash Professional的ActionScript 3.0项目(CS6,如果它很重要)的伟大工程。

I recently found Mike Chambers' as3corelib when looking for ways to render the stage to a file. Works great in my ActionScript 3.0 project in Flash Professional (CS6 if it matters).

我决定去看看一些迈克的实用工具类,特别是日期相关的。然而,他的DateUtil类进口mx.formatters.DateBase中,当我尝试使用一些方法,我得到很多的(和批次)未定义的属性DATEBASE的访问。

I decided to look at some of Mike's utility classes, notably the date related ones. However, his DateUtil class imports mx.formatters.DateBase, and when I attempt to use some of the methods, I'm getting lots (and lots) of "Access of undefined property DateBase."

我猜想这是因为一些参考Flex SDK的缺失或错误。我添加$(FlexSDK)/frameworks/libs/flex.swc到我的项目的库路径,但是这没有帮助。

I'm assuming that's because some reference to the Flex SDK is missing or wrong. I've added $(FlexSDK)/frameworks/libs/flex.swc to my project's Library path, but that's not helping.

我已经使用闪光灯多年,但这是我第一次真正的code为中心的项目,并通过艰苦的磨练学校还在学习。不知道发生了什么事情错在这里。想法?

I've used Flash for years, but this is my first truly code-centric project, and still learning through the school of hard knocks. No idea what's going wrong here. Ideas?

从的as3corelib示例

Example from as3corelib

package com.adobe.utils
{
    import mx.formatters.DateBase;

    /**
    *   Class that contains static utility methods for manipulating and working
    *   with Dates.
    */  
    public class DateUtil
    {

        /**
        * Returns a date string formatted according to RFC822.
        */  
        public static function toRFC822(d:Date):String
        {
            var date:Number = d.getUTCDate();
            var hours:Number = d.getUTCHours();
            var minutes:Number = d.getUTCMinutes();
            var seconds:Number = d.getUTCSeconds();
            var sb:String = new String();
            sb += DateBase.dayNamesShort[d.getUTCDay()];
            sb += ", ";

...

该行:

sb += DateBase.dayNamesShort[d.getUTCDay()];

...生成提到的错误一样,在其他同类DATEBASE参考。同样,这code是直接从最新的as3corelib,位于GitHub上: https://github.com/mikechambers /的as3corelib

推荐答案

不知道你是否有这一个舔与否,但我打了同样的事情。爱库,讨厌错误消息。

Don't know whether you got this one licked or not, but I hit the same thing. Love the library, hate the error messages.

我下载的Flex SDK从这里开始:

I downloaded the Flex SDK from here:

的Adobe Flex SDK下载

然后,我解压缩了到一个临时文件夹中。

Then, I unzipped that into a temporary folder.

然后,因为我不想整个Flex框架潜伏,我创建的目录所在的FLA文件的生活里面./lib目录。然后我转移这些SWCS从这里(里面解压文件的结构):

Then, since I didn't want the whole flex framework lurking about, I created a ./lib directory inside the directory where the .fla file lives. I then moved these swcs from here (Inside the unzipped file structure):

mv ~/Downloads/flex_sdk_4.6/frameworks/libs/framework.swc ./lib
mv ~/Downloads/flex_sdk_4.6/frameworks/libs/core.swc ./lib
mv ~/Downloads/flex_sdk_4.6/frameworks/libs/mx/mx.swc ./lib

不知道为什么三个人都需要的,但它停止了编译器抱怨(并得到了日期的转换工作)。

Not sure why all three were required, but it stopped the compiler complaining (and got the date conversions working).

您需要将它们添加到.fla文件的库列表,以及(ActionScript设置下);但我打赌你已经知道了。

You need to add them to the .fla's library list as well (under ActionScript Settings); but I'm betting you already knew that.

也许是有用的,也许不是。

Perhaps useful, perhaps not.

这篇关于问题在Flash Professional中使用Flex SDK(有关的as3corelib)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆