I wrote an flash actionscript 3.0 movie that needs to use netconnection and netstream for streaming. When I test the movie through flash ide the movie connects alright.But when I insert the swf in html and view from firefox, chrome or other browser NetConnection.connect() does not work. Movie sort of hangs at the moment NetConnection.connect is called(). The function assigned to NetStatusEvent is not called and no command after that moment is carried out.
It only occurs when viewed through web browser but when it is tested in flash ide it works alright.
You are using a local-with-network file to access the internet, which causes a security sandbox violation.
You need to compile your SWF with
-use-network=true
(if you're in Flash Builder or FDT) or alter your export settings in the Flash IDE accordingly.