2009-07-31 23:13:08 +08:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
BigBlueButton - http://www.bigbluebutton.org
|
|
|
|
|
|
|
|
Copyright (c) 2008-2009 by respective authors (see below). All rights reserved.
|
|
|
|
|
|
|
|
BigBlueButton is free software; you can redistribute it and/or modify it under the
|
|
|
|
terms of the GNU Lesser General Public License as published by the Free Software
|
|
|
|
Foundation; either version 3 of the License, or (at your option) any later
|
|
|
|
version.
|
|
|
|
|
|
|
|
BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License along
|
|
|
|
with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
$Id: $
|
|
|
|
-->
|
|
|
|
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
|
|
|
|
implements="org.bigbluebutton.common.IBigBlueButtonModule" xmlns:maps="org.bigbluebutton.modules.highlighter.maps.*"
|
|
|
|
creationComplete="init()" xmlns:mate="http://mate.asfusion.com/">
|
|
|
|
<mx:Script>
|
|
|
|
<![CDATA[
|
2010-07-06 17:13:26 +08:00
|
|
|
import org.bigbluebutton.common.LogUtil;
|
2009-07-31 23:13:08 +08:00
|
|
|
import com.asfusion.mate.events.Dispatcher;
|
2010-05-21 01:47:47 +08:00
|
|
|
|
2009-07-31 23:13:08 +08:00
|
|
|
import mx.controls.Alert;
|
2010-05-21 01:47:47 +08:00
|
|
|
|
|
|
|
import org.bigbluebutton.modules.highlighter.events.StartHighligtherModuleEvent;
|
|
|
|
import org.bigbluebutton.modules.highlighter.events.StopHighlighterModuleEvent;
|
2010-07-06 16:32:52 +08:00
|
|
|
|
2009-09-14 21:49:36 +08:00
|
|
|
private var _moduleId:String = "HighlighterModule";
|
|
|
|
private var _moduleName:String = "Highlighter Module";
|
2009-07-31 23:13:08 +08:00
|
|
|
private var _attributes:Object;
|
|
|
|
|
|
|
|
private var globalDispatcher:Dispatcher;
|
|
|
|
|
|
|
|
private function init():void{
|
|
|
|
LogUtil.debug("HighlighterModule::init");
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get moduleId():String {
|
|
|
|
return _moduleId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get moduleName():String {
|
|
|
|
return _moduleName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get uri():String {
|
|
|
|
if (_attributes.mode == "PLAYBACK") {
|
|
|
|
return _attributes.uri + "/" + _attributes.playbackRoom;
|
|
|
|
}
|
|
|
|
|
|
|
|
return _attributes.uri + "/" + _attributes.room;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get username():String {
|
|
|
|
return _attributes.username;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get connection():NetConnection {
|
|
|
|
return _attributes.connection;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get mode():String {
|
|
|
|
if (_attributes.mode == null) {
|
|
|
|
//_attributes.mode = "PLAYBACK"
|
|
|
|
_attributes.mode = "LIVE"
|
2009-09-14 21:49:36 +08:00
|
|
|
LogUtil.debug('Setting HighlighterModule mode: ' + _attributes.mode);
|
2009-07-31 23:13:08 +08:00
|
|
|
}
|
2009-09-14 21:49:36 +08:00
|
|
|
LogUtil.debug('HighlighterModule mode: ' + _attributes.mode);
|
2009-07-31 23:13:08 +08:00
|
|
|
return _attributes.mode;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get userid():Number {
|
|
|
|
return _attributes.userid as Number;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function get role():String {
|
|
|
|
return _attributes.userrole as String;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function start(attributes:Object):void {
|
2009-09-14 21:49:36 +08:00
|
|
|
LogUtil.debug("highlighter attr: " + attributes.username);
|
2009-07-31 23:13:08 +08:00
|
|
|
_attributes = attributes;
|
|
|
|
globalDispatcher = new Dispatcher();
|
2009-09-14 21:49:36 +08:00
|
|
|
//eventMap.createHighlighterCanvas();
|
2009-07-31 23:13:08 +08:00
|
|
|
|
2009-08-01 03:01:20 +08:00
|
|
|
var startEvent:StartHighligtherModuleEvent = new StartHighligtherModuleEvent();
|
2010-02-01 04:00:53 +08:00
|
|
|
startEvent.attributes = attributes;
|
|
|
|
globalDispatcher.dispatchEvent(startEvent);
|
2009-08-01 03:01:20 +08:00
|
|
|
|
2009-07-31 23:13:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public function stop():void {
|
2010-05-21 01:47:47 +08:00
|
|
|
globalDispatcher.dispatchEvent(new StopHighlighterModuleEvent(StopHighlighterModuleEvent.STOP_HIGHLIGHTER_MODULE_EVENT));
|
2009-07-31 23:13:08 +08:00
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</mx:Script>
|
2010-07-05 20:27:00 +08:00
|
|
|
|
2009-07-31 23:13:08 +08:00
|
|
|
<maps:HighlighterEventMap id="eventMap" />
|
|
|
|
</mx:Module>
|