AS3 - URLload本地文件absoute路径 [英] AS3 - URLload local files with absoute path

查看:135
本文介绍了AS3 - URLload本地文件absoute路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打开里面的AS3本地硬盘驱动器的文件。我得到一个安全的错误与此code:

I am trying to open local hard drive files inside AS3. I'm getting a security error with this code:

var soundFile:URLRequest = new URLRequest("c:\slushy.mp3");

是否有可能URLload硬盘驱动器上的绝对路径?

Is it possible to URLload an absolute path on the hard drive?

编辑:所以这似乎是一个沙盒问题。讨厌鬼。是否有可能通过PHP来加载本地文件,并且发送到Flash?

so this appears to be a sandboxing issue. Drat. Is it possible to load the local file via PHP and send to flash?

推荐答案

PHP是一种服务器端语言,所以最终的协议是HTTP。

PHP is a server language, so the final protocol is http.

在您必须通过文件存取权限:///到本地文件,但如果你想共享互联网资源,你必须上传您的文件到文件夹中的站点的根

The you must to acces by file:/// to the local file, but if you want to share the resources over Internet, you must upload your files to folder in the root of site.

举例: http://www.mysite.com/music

然后就可以加载文件:

    var soundFile:URLRequest = new URLRequest("http://www.mysite.com/music/slushy.mp3");

必要的:你必须创建目录乐在服务器上的Web应用程序目录和上传文件

Requisite: you must to create the directory "music" in server web application directory and upload the file.

这篇关于AS3 - URLload本地文件absoute路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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