2011-11-23 53 views
1

我正在使用Flash播放器查看实时流。虽然我这样做,我试图播放和暂停使用以下功能的流,但它只适用于只有一次点击。如果我重新点击它不会显示任何更改。如果你意识到我的问题。请给我建议。播放和暂停功能只能使用一次

function testPause(event:MouseEvent) { 
    nsPlay.pause(); 
} 

function testPlay(event:MouseEvent) { 
    if(!bolLoaded) { 
     nsPlay.play(streamValue); 
     bolLoaded = true; 
    } else { 
     nsPlay.resume(); 
    } 
} 

回答

0

使布尔变量值在暂停状态下为FALSE。

bolLoaded = false;