通过 HTTP 运行基本 Flex 项目?
如何配置 Flex Builder 通过 http (http://localhost/MyProject.html) 运行基本 Flex 项目?我无法弄清楚如何在通过类似 file:///Users/Me/Flex/MyProject... 之类的文件在本地运行时使用 crossdomain.xml 文件...
在带有 Safari/FireFox 的 Mac 上运行此文件。
谢谢!
How do you configure Flex Builder to run basic flex projects over http (http://localhost/MyProject.html)? I can't figure out how to use crossdomain.xml files when running locally via something like file:///Users/Me/Flex/MyProject...
Running this on a Mac with Safari/FireFox.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您提到您正在开发的操作系统是 Windows 还是 Mac OSX,那将是值得的。
一般来说,您会要求 Flex Builder 将构建部署到 IIS Web 服务器(如果在 Windows 上)或 Apache Web 服务器(如果在 OSX 上)已经提供的可通过 Web 访问的位置。具体操作方法如下:
在 Windows 上,您通常会选择一个输出文件夹,例如 C:\inetpub\wwwroot\xyz ...,其中 xyz 是您创建的用于保存项目输出文件的文件夹的名称。可以通过 http://localhost/xyz/YourFlexApp.html
在 Mac OSX 上 访问要使用的输出文件夹是 /Users/yourusername/Sites/xyz ... 其中 yourusername 是您的用户名,xyz 是您创建的用于保存您的项目的输出文件。可以通过 http://localhost/~yourusername/xyz/YourFlexApp.html 进行访问
重要提示:确保您的本地网络服务器已安装并启用。
此外,您需要更改运行/调试设置,以便 Flex Builder 通过 http:// URL 而不是通过文件引用启动您的项目。操作方法如下:
我希望这有帮助。
It would be worthwhile if you mentioned what OS you are developing on: Windows, or Mac OSX?
In general, you'll be asking Flex Builder to deploy your build to a web-accessible location provided already by the IIS web server (if on Windows), or the Apache web server (if on OSX.) Here's how:
On Windows, you'll typically choose an output folder such as C:\inetpub\wwwroot\xyz ... where xyz is the name for a folder you created to hold your project's output files. That will be accessible as http://localhost/xyz/YourFlexApp.html
On Mac OSX, a good output folder to use is /Users/yourusername/Sites/xyz ... where yourusername is your user name, and xyz is the name for a folder you created to hold your project's output files. That will be accessible as http://localhost/~yourusername/xyz/YourFlexApp.html
Important: Ensure your local web server is installed and enabled.
Additionally, you'll want to change your Run/Debug settings so that Flex Builder launches your project via http:// URL instead of via a file reference. Here's how:
I hope this helps.
实际上,这是一个 Flash 设置。您需要使您尝试在其中运行 Flash 的文件夹获得 Flash 的允许。访问此网站,该网站运行 Flash 的特殊组件。 http://www.macromedia.com/support/documentation/ en/flashplayer/help/settings_manager04.html
在“位置”部分中添加本地文件夹位置并将其设置为“允许”。用它来保存你的设置并不是超级直观的,但它不应该需要多次尝试。
This is a Flash setting, actually. You need to make the folder you're trying to run Flash in allowed by Flash. Go to this website, which runs a special component of Flash. http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
Add the local folder location inside the 'locations' piece and make them Allowed. It's not super-intuitive getting it to save your settings, but it shouldn't take more than one try.