码迷,mamicode.com
首页 > 其他好文 > 详细

As3 Embed Swf

时间:2015-12-14 16:25:55      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:

使用As3在代码中嵌入swf,遇到Error: unable to resolve ‘../resources/lv1.swf‘ for transcoding 这种问题,检查之下,代码没有问题:

public class SwfController
    {
        [Embed(source = "../resources/lv0.swf")] static private var Swf_0:Class;
        [Embed(source = "../resources/lv1.swf")] static private var Swf_1:Class;
        [Embed(source = "../resources/lv02.swf")] static private var Swf_2:Class;
        [Embed(source = "../resources/lv03.swf")] static private var Swf_3:Class;
        [Embed(source = "../resources/lv04.swf")] static private var Swf_4:Class;
        [Embed(source = "../resources/lv05.swf")] static private var Swf_5:Class;

但就是报错编译不过去,最后仔细一看,原来是swf的名字写错了,[Embed(source = "../resources/lv1.swf")] static private var Swf_1:Class;

应该是[Embed(source = "../resources/lv01.swf")] static private var Swf_1:Class;

人生最痛苦的事莫过于 你亲手制造的bug就在眼前,而你却找不到。

As3 Embed Swf

标签:

原文地址:http://www.cnblogs.com/chinayfhuang/p/5045418.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!