Update: Turns out this is undocumented behaviour of the NetStream class - NetStream loads relative to the swf, as opposed to URLRequest which loads relative to the HTML doc... annoying.
I am having a strange issue where loading an FLV file using the fl.video.VideoPlayer
class that comes with CS4: Adobe docs here
Usually when loading external content into flashplayer, the path is relative to the HTML page that the swf is embedded in - but when I try and load an FLV using the VideoPlayer class the player looks for a path relative to the swf, not to the HTML (as you would expect).
eg:
My file setup is:index.html
(which contains the swf)swf/my-video-player.swf
video/my-video.flv
When I call videoPlayer.play("video/my-video.flv")
, from the swf (in index.html), the browser attempts to load "swf/video/my-video.flv"
, which is relative to the swf, not to the HTML.
Has anyone else experienced this behaviour with the VideoPlayer class? Any ideas why this might be happening?