com.adobe.indesign::IDSWFFile :加载 swf 文件时出现 Null 异常

发布于 2024-11-04 21:56:16 字数 1587 浏览 2 评论 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 Png 和 Jpeg 的类 SpreadView 中像这样使用,

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

效果很好。我从 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 或更高版本。错误从何而来?

This is my class in essence

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.
    }
}

And it's used like this in a class SpreadView which extends UIComponent

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

Png and Jpeg works fine. And swf-files which I export from Indesign CS4 or Indesign CS5 works fine aswell. But recently,older swf-files which have been exported using the same method and parameters (in Indesign CS4) and which used to work, have suddenly refused to load and I get the following error, when UpdateDisplayList is called for the ImageFrameView:

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()

What happens is that the loaded swf-file throws an exception when it tries to read its own configuration.

All swf-files that I've created past and present still work. All swf-files that clients have created created past and present - doesn't work even tough they worked in the past. As far as I know the swf-files is created using the same method and parameters.

Can there be some sudden change in Adobe Flash that I'm not aware of? Me and my client is using Flash 10.1 or higher. Where does the error orgin from?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇柔作态 2024-11-11 21:56:16

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

It seems like it is page transistions and/or page curl was the culprit. I don't know why but when I ticked off the options for page transistions the error vanished when the pdf is loaded. As such features is meaningless in my app I will make sure that such options is disallowed when the clients exports swf-files from indesign.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文