diff --git a/cocos2d/core/components/CCSlider.js b/cocos2d/core/components/CCSlider.js index 81cb459201..549e3d6461 100644 --- a/cocos2d/core/components/CCSlider.js +++ b/cocos2d/core/components/CCSlider.js @@ -182,11 +182,12 @@ var Slider = cc.Class({ _handleSliderLogic: function (touch) { this._updateProgress(touch); - this._emitSldeEvent(); + this._emitSlideEvent(); }, - _emitSldeEvent: function () { + _emitSlideEvent: function () { cc.Component.EventHandler.emitEvents(this.slideEvents, this); + this.node.emit('slide', this); }, _updateProgress: function (touch) { diff --git a/cocos2d/core/components/CCVideoPlayer.js b/cocos2d/core/components/CCVideoPlayer.js index 52e83c431e..2710efbfe6 100644 --- a/cocos2d/core/components/CCVideoPlayer.js +++ b/cocos2d/core/components/CCVideoPlayer.js @@ -265,30 +265,37 @@ var VideoPlayer = cc.Class({ onReadyToPlay: function () { cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.READY_TO_PLAY); + this.node.emit('ready-to-play', this); }, onMetaLoaded: function () { cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.META_LOADED); + this.node.emit('meta-loaded', this); }, onClicked: function () { cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.CLICKED); + this.node.emit('clicked', this); }, onPlaying: function(){ cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.PLAYING); + this.node.emit('playing', this); }, onPasued: function() { cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.PAUSED); + this.node.emit('paused', this); }, onStopped: function() { cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.STOPPED); + this.node.emit('stopped', this); }, onCompleted: function() { cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.COMPLETED); + this.node.emit('completed', this); }, /**