# How to communicate using 'Socket (Flash)' inside a web-page?

**URL:** <https://forum.kirupa.com/t/how-to-communicate-using-socket-flash-inside-a-web-page/284921>\
**Category:** flash\
**Created:** [March 25, 2009, 4:43am UTC](https://forum.kirupa.com/t/how-to-communicate-using-socket-flash-inside-a-web-page/284921 "2009-03-25T04:43:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khande](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Khande](https://forum.kirupa.com/u/Khande)\
**Post date:** [March 25, 2009, 4:43am UTC](https://forum.kirupa.com/t/how-to-communicate-using-socket-flash-inside-a-web-page/284921/1 "2009-03-25T04:43:08Z")

</div>

Hi,

I have created ‘Socket’ which will connect to port 5080 on a server. (A java server code is already listening on that port). Now this .swf is placed inside .htm file which is placed on the server’s root folder.

When I run (double clicking) the file (\*.htm) the flash code runs very fine (also when I compile Flash file it runs perfectly) **[COLOR=Black]BUT when I call that file from localhost ([http://localhost/file-name.htm](http://localhost/file-name.htm)) then the flash code don’t work[/COLOR]**. (I also tried using crossdomain.xlm) (I tried IIS 7 as well as IIS 5)

Can any-one tell me the reason? Is it happening because IIS don’t allow user to communicate with any port other than 80? Security reasons?

Any help appreciated.
