I am trying to package a web site prototype in AIR to make it easier for the client to use for presentations. I have several FLV players that work as expected in browsers but fail to load the NetStream when running through AIR. The html, swf, and flv are all located on the same level but if I just use the file name as the path it is not found in AIR. If I give it an absolute path such as "Users/user/Desktop/App/myvideo.flv" it plays just fine. Obviously an absolute path isn't going to be the same on a different system if the user installs to a different directory. Does anyone know how to properly load a stream or is there a way for me to retrieve the location of the AIR app so I can load that string into flash?
This error can result from using a native path to the file instead of the file URL. Properties for both the native path and the URL are available on the File object.
I'm pretty new to developing in AIR but your answer sounds like it is on the right track. Would you be able to point me towards any documentation that might shed some more light on using the File object?
Alright I think I may have gotten it,
var file = air.File.applicationDirectory;
file = file.resolvePath("PrototypePlayer-Music-Video.flv");