From: <aut...@us...> - 2013-04-11 02:09:49
|
Revision: 498 http://upstage.svn.sourceforge.net/upstage/?rev=498&view=rev Author: aut-upstage Date: 2013-04-11 02:09:42 +0000 (Thu, 11 Apr 2013) Log Message: ----------- 11/04/2013 Craig Farrell - added left rotate for avatars . Modified Paths: -------------- branches/2.4.3/client/src/model/ModelAvatars.as branches/2.4.3/html/swf/classes.swf branches/2.4.3/html/swf/client.swf Modified: branches/2.4.3/client/src/model/ModelAvatars.as =================================================================== --- branches/2.4.3/client/src/model/ModelAvatars.as 2013-04-09 00:34:21 UTC (rev 497) +++ branches/2.4.3/client/src/model/ModelAvatars.as 2013-04-11 02:09:42 UTC (rev 498) @@ -42,6 +42,10 @@ * Modified by: Vibhu Patel 31/08/2011 - Added field and function to store and set the background color of tool box items. * Modified by: Daniel han 13/09/2012 - Added contextmenu for drawables. * Modified by: Daniel Han 14/09/2012 - Added layer parameter under draw_line draw_move methods to calculate and send avatar relational position of drawing. + * Modified by: Craig Farrell 11/04/2013 - added new varible 'rotateClockWise' boolean. + * - added rotate left(ani-clockwise) + * - added new right click 'rotate avatar left' menu item. + * */ class model.ModelAvatars implements TransportInterface { @@ -65,6 +69,8 @@ public var avatars :Array; private var userID :String; public var moveFast :Boolean; + public var rotateClockWise :Boolean;//(11/04/2013) Craig + private var drawing :Boolean; private var bAudioing :Boolean; // PQ: Added @@ -85,6 +91,7 @@ this.avatar = null; this.avatars = new Array(); this.moveFast = false; + this.rotateClockWise = true;//(11/04/2013) Craig this.modelsounds = modelSounds; this.avscrollBarColor = Client.UI_BACKGROUND; }; @@ -238,11 +245,24 @@ //------------------------------------------------------------------------- // Messages sent from Views to server - - function SET_ROTATE_AVATAR() + /** + * @Modified Craig Farrell (11/04/2013) + * @param clockwise:boolean + * @brief sends a message to server to rotate avatar. + */ + function SET_ROTATE_AVATAR(clockwise:Boolean)//(11/04/2013) Craig { + if (clockwise)//(11/04/2013) Craig + { + this.rotateClockWise = true; + } + else + { + this.rotateClockWise = false; + } this.sender.ROTATE_AVATAR(); } + //------------------------------------------------------------------------- // Messages from ActorButtons @@ -591,13 +611,17 @@ modelAv.setLastStyle(); }); - var rotateAvatarMenuItem:ContextMenuItem = new ContextMenuItem("Rotate Avatar", function(){ - modelAv.SET_ROTATE_AVATAR(); + var rotateAvatarRightMenuItem:ContextMenuItem = new ContextMenuItem("Rotate Avatar Right", function(){ + modelAv.SET_ROTATE_AVATAR(true);//(11/04/2013) Craig }); + + var rotateAvatarLeftMenuItem:ContextMenuItem = new ContextMenuItem("Rotate Avatar Left", function(){//(11/04/2013) Craig + modelAv.SET_ROTATE_AVATAR(false); + }); drawAvatarMenuItem.separatorBefore = true; - myMenu.customItems.push(rotateAvatarMenuItem, moveupMenuItem, movedownMenuItem, movefastMenuItem, moveSlowMenuItem, drawAvatarMenuItem, clearDrawingMenuItem, renameMenuItem); + myMenu.customItems.push(rotateAvatarRightMenuItem,rotateAvatarLeftMenuItem, moveupMenuItem, movedownMenuItem, movefastMenuItem, moveSlowMenuItem, drawAvatarMenuItem, clearDrawingMenuItem, renameMenuItem); av.menu = myMenu; } @@ -838,15 +862,24 @@ } /** - * @author Daniel Han (15/09/2012) + * @modified Craig Farrell (11/04/2013) * @param avID - * @brief Sets the rotation of avatar + * @brief Sets the rotation of avatar clockwise or ani clockwise */ function GET_ROTATE_AVATAR(avID:Number) { - avatars[avID].setRotation(90); + if (rotateClockWise) + { + avatars[avID].setRotation(90); + } + else + { + avatars[avID].setRotation(-90);//(11/04/2013) Craig + } + } + //------------------------------------------------------------------------- // Utility functions /** Modified: branches/2.4.3/html/swf/classes.swf =================================================================== (Binary files differ) Modified: branches/2.4.3/html/swf/client.swf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |