开发者

Flash and Localhost environment. No connection to the real web?

开发者 https://www.devze.com 2023-03-23 12:16 出处:网络
I\'m developing a flash thingy that connects to the youtube api. The website that contains the flashthingy is developed locally on my computer.

I'm developing a flash thingy that connects to the youtube api. The website that contains the flashthingy is developed locally on my computer.

I don't konw why flash does this, but it doesn't connect to anything on the real web. E.g. the youtube api. As soon as I deploy the project to a real server everything works fine.

Since I have a lot of dev still before me I'd love to test this stuff locally. Any idea what I have to do in order to get fl开发者_如何学JAVAash connected to real websites?

Thank you


All this is happening because of flash security sandbox.

go here: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

and add your root development directory to trusted sites.

for example: D:/dev Then it will be working fine.

if you have more folders, then add them too.

p.s. of if you are using a newer version of flash player just open flash in browser and click right mouse button, then Global Settings...

UPDATE

This is how it looks from my localFiles in the browser:

  • first call is made by HTML to download ge_flash_player.gif image
  • second call is made from flash to googleAnalytics, which as you can see Resulted a HttpStatus 200.

Flash and Localhost environment. No connection to the real web?


You can't have a Flash executed locally in your browser (file://C:/myflash.html) connect to the Internet. You have to install a local server (WAMP, EasyPhp...) and run your Flash on http://localhost.

0

精彩评论

暂无评论...
验证码 换一张
取 消