0

本质上这是我的课

import mx.controls.Image;
public class ImageFrameView extends Image
{
    //Model. Contains x, y, z and z. Url for the png/jpg or swf-file
    private var m_imageFrame:ImageFrame;

    public function ImageFrameView(imageFrame:ImageFrame)
    {
        super();
        m_imageFrame = imageFrame;
        initFrameView();
    }

    private function initFrameView():void
    {
         maintainAspectRatio = false;
         width    = m_imageFrame.width;
         height   = m_imageFrame.height;
         x        = m_imageFrame.x;
         y        = m_imageFrame.y;
         rotation = m_imageFrame.rotation;           
         source   = m_imageFrame.url; //Url points to a handler on the same server which serves images and/or swf-files.
    }
}

并且它在扩展 UIComponent 的类 SpreadView 中像这样使用

var imageFrameView:ImageFrameView = new ImageFrameView(contentFrame as ImageFrame);
addChild(imageFrameView);

Png 和 Jpeg 工作正常。我从 Indesign CS4 或 Indesign CS5 导出的 swf 文件也可以正常工作。但是最近,使用相同的方法和参数(在 Indesign CS4 中)导出并且曾经工作的旧 swf 文件突然拒绝加载,并且当为 ImageFrameView 调用 UpdateDisplayList 时出现以下错误:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at com.adobe.indesign::IDSWFFile/readConfigurationData()
    at com.adobe.indesign::IDSWFFile()

发生的情况是,加载的 swf 文件在尝试读取自己的配置时抛出异常。

我过去和现在创建的所有 swf 文件仍然有效。客户在过去和现在创建的所有 swf 文件 - 甚至在过去工作时都无法正常工作。据我所知,swf 文件是使用相同的方法和参数创建的。

Adobe Flash 中会不会有一些我不知道的突然变化?我和我的客户正在使用 Flash 10.1 或更高版本。错误从何而来?

4

1 回答 1

0

似乎是页面转换和/或页面卷曲是罪魁祸首。我不知道为什么,但是当我勾选页面转换选项时,加载 pdf 时错误消失了。由于这些功能在我的应用程序中毫无意义,我将确保当客户端从 indesign 导出 swf 文件时不允许使用此类选项。

于 2011-05-04T07:02:17.790 回答