This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generateClickMap:function (image) { | |
var imageData, data, width, height; | |
var c = document.createElement('canvas'); | |
var ctx = c.getContext('2d'); | |
var clickMap = []; | |
width = image.width; | |
height = image.height; | |
c.width = width; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generateClickMap:function (image) { | |
var imageData, data, width, height; | |
var c = document.createElement('canvas'); | |
var ctx = c.getContext('2d'); | |
var clickMap = []; | |
width = image.width; | |
height = image.height; | |
c.width = width; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateClickMap(id) { | |
var imageData, data, width, height; | |
var c = document.createElement('canvas'); | |
var ctx = c.getContext('2d'); | |
var imageObj = this.director.getImage(id); | |
var clickMap = []; | |
width = imageObj.width; | |
height = imageObj.height; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void ProcessFrame(FrameType frameType, byte[] data, Action<string> onMessage, Action onClose, | |
Action<byte[]> onBinary) | |
{ | |
var encoding = new UTF8Encoding(false, true); | |
switch (frameType) | |
{ | |
case FrameType.Close: | |
if (data.Length == 1 || data.Length>125) | |
throw new WebSocketException(WebSocketStatusCodes.ProtocolError); | |
if (data.Length == 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void ProcessFrame(FrameType frameType, byte[] data, Action<string> onMessage, Action onClose, | |
Action<byte[]> onBinary) | |
{ | |
switch (frameType) | |
{ | |
case FrameType.Close: | |
if (data.Length == 2) | |
{ | |
var closeCode = (uint)data.Take(2).ToArray().ToLittleEndianInt(); | |
switch (closeCode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (data.Length == 2) | |
{ | |
var closeCode = (uint)data.Take(2).ToArray().ToLittleEndianInt(); | |
switch (closeCode) | |
{ | |
case 1000: | |
// Do something | |
break; | |
case 1001: | |
// Do something |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(k) { | |
var Button = function(a, x, y) { | |
this.initialize(a,x,y) | |
},p = Button.prototype = new DisplayObject; | |
p.left = 0; | |
p.top = 0; | |
p.ypos = 0; | |
p.image = null; | |
p.snapToPixel = true; |