netStreamVideo.onEnd = onEnd; netStreamVideo.onCuePoint = function(infoObject:Object) { if (infoObject.name == "end") { this.onEnd = true; } }