本质上这是我的班级
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或更高版本。这个错误是从哪里来的?
发布于 2011-05-04 15:02:18
似乎是页面转换和/或页面卷曲是罪魁祸首。我不知道为什么,但当我勾选了页面转换的选项时,当加载pdf时,错误就消失了。由于这些功能在我的应用程序中毫无意义,因此我将确保在客户端导出indesign中的swf文件时不允许使用这些选项。
https://stackoverflow.com/questions/5868076
复制相似问题