通过一个基本路径,以在运行时加载的SWF [英] pass a base path to a swf loaded at runtime

查看:117
本文介绍了通过一个基本路径,以在运行时加载的SWF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的main.swf它加载module.swf和module.swf装载部分资产。 该module.swf独立工作,也需要当的main.swf装载工作。

I have a main.swf which loads a module.swf and the module.swf loads some assets. The module.swf works standalone and also needs to work when loaded by main.swf.

但不幸的是,module.swf找不到资产时,通过的main.swf加载,因为资产没有位于相对的main.swf,但位于相对于module.swf。

But unfortunately the module.swf can't find the assets when loaded by main.swf because the assets aren't located relative to the main.swf, but are located relative to the module.swf.

正如我不能碰module.swf,我也不愿改变的目录结构,我要寻找一个解决方案,接近一个的基地的参数,它可以在一个swf被嵌入到HTML中使用。

As I can't touch the module.swf and I'm also unwilling to change the directory structure, I am looking for a solution close to the a "base" parameter which can be used when a swf is embedded into html.

有没有办法使用加载SWF文件时,模拟基参数的行为装载机

Is there a way to simulate the base parameter's behaviour when loading a swf file using Loader?

<一个href="http://stackoverflow.com/questions/1957299/loaded-swf-inside-of-other-swf-working-directory">Here是一种类似但悬而未决的问题。

Here is a similar yet unanswered question.

推荐答案

您可以使用的 的符号链接,以此来重定向你的资产网址

You could use symlinks as a way to redirect your assets url when loaded via the main swf

这篇关于通过一个基本路径,以在运行时加载的SWF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆