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

时间:2011-05-03 10:18:54

标签: actionscript-3 flash adobe-indesign

这本质上是我的课程

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

它在类SpreadView中使用,它扩展了UIComponent

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或更高版本。错误来自哪里?

1 个答案:

答案 0 :(得分:0)

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

相关问题