Flex VideoDisplay:动态加载新资产

时间:2011-08-04 21:06:31

标签: flex video air

我有一个带有VideoDisplay元素的AIR App。 如果我立即定义了source =“”,则会加载应用并播放视频:

<s:VideoDisplay id="player"
    width="350" height="240"
    source="http://www.helpexamples.com/flash/video/cuepoints.flv" />

但是如果我想动态更改源代码,通过调用player.source = "http://other_file"我得到一个空错误(1009)告诉我正在尝试访问一个空对象!!

有没有办法做我想做的事情?或者我应该杀死播放VideoDisplay并从函数中创建另一个吗?

0 个答案:

没有答案