0

I have a SWF which loads images and displays it.

Path to images is relative. It looks like this:

../../../images/thumbnail1.png

On Windows it works fine.

On MAC OS X SWF file cannot load images. So is there any differences between relative path on Windows and MAC OS?

previewImagePath is ../../../images/thumbnail1.png

previewLoader = new Loader();
previewLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, previewLoaded);
previewLoader.load(new URLRequest(previewImagePath));

public function previewLoaded(e:Event):void
{
    previewImageBtm = Bitmap(previewLoader.content);
    previewImageBtm.smoothing=true;
    addChild(previewImageBtm);  
}//previewLoaded
4

1 回答 1

0

OSX 在以前的文件夹中加载图像没有任何限制。你的代码是正确的。确保您在以前的文件夹中拥有足够的权限,并在本地服务器中测试您的文件。

在这里,您有一个示例,并且可以在我的 Mac 上完美运行。

https://docs.google.com/file/d/0Bw9pbLM_BascdWs2d2lCZFVRdWM/edit?usp=sharing

于 2013-04-25T11:56:16.527 回答