Your issue is likely the format of your url.
ns.play("rtmp://localhost/HelloWorld/media/sample.flv");
This tells Adobe Media Server to load an instance of the HelloWorld application named media
In Adobe media server, you don't pass in any paths for media when connecting. It looks in the streams folder for the media passed. You can also use the Application.xml file (or the main config file) to add other directories to look in for the media.
The easiest way to make this work, is to rename your media folder to "streams". Then connect like so:
ns.play("rtmp://localhost/HelloWorld/sample.flv");
Leaving off the .flv should also work just fine. You may need to make a sub-folder in the streams folder called _definst_
and put your media inside of that.
If it still doesn't work, you likely have an issue with your Application.xml.
Try creating an Application.xml file in your application directory. Use the following:
<Application>
<StreamManager>
<VirtualDirectory>
<!-- Specifies application specific virtual directory mapping for recorded
streams. -->
<Streams>/;C:\Program Files\Adobe\Adobe Media Server 5\applications\HelloWorld\</Streams>
</VirtualDirectory>
</StreamManager>
</Application>