Flex VideoDisplay : dynamically load a new asset
I have an AIR App with a VideoDisplay element in it. If I define a source="" right away, the app loads and the video plays :
<s:VideoDisplay id="player"
开发者_StackOverflow中文版 width="350" height="240"
source="http://www.helpexamples.com/flash/video/cuepoints.flv" />
But if I want to dynamically change the source, by calling player.source = "http://other_file"
I get a null error (1009) telling that I am trying to access a null object !!
Is there a way to do what I am trying to do ? Or should I kill the playing VideoDisplay and create another one from the function ?
精彩评论