开发者

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 ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜