var actionObject = new Array(); actionObject[0] = 'point'; actionObject[1] = x1; actionObject[2] = y1; actionObject[3] = x2; actionObject[4] = y2; this.basetempactionobjectList.push(actionObject); //Debug.write("startPaint ",this.startx,this.starty); this.currentlayer = new lz.drawViewNew(this, { name : 'paint' + this.getCounter(), width : this.width + 2, height : this.height + 2, x : -1, y : -1, opacity : this.currentlayerOpacity }); this.drawlineOnObject(this.currentlayer, -1, -1, 0, 0); this.drawlineOnObject(this.currentlayer, this.width, this.height, this.width + 1, this.height + 1); this.startx = this.currentlayer.getMouse('x'); this.starty = this.currentlayer.getMouse('y'); //Set previous to null this.prevx = null; this.prevy = null; currentlayer.strokeStyle = this.currentlayerstroke; currentlayer.lineWidth = this.currentlayerlineWidth; currentlayer.fillstyle = '0x000000'; this.basetempactionobjectList = new Array(); //beginFill( the_colorpicker.selectedColor ); ////Debug.write("endPaint"); maxx) maxx = this.basetempactionobjectList[eg][1]; if (this.basetempactionobjectList[eg][3] > maxx) maxx = this.basetempactionobjectList[eg][3]; if (this.basetempactionobjectList[eg][2] < miny) miny = this.basetempactionobjectList[eg][2]; if (this.basetempactionobjectList[eg][4] < miny) miny = this.basetempactionobjectList[eg][4]; if (this.basetempactionobjectList[eg][2] > maxy) maxy = this.basetempactionobjectList[eg][2]; if (this.basetempactionobjectList[eg][4] > maxy) maxy = this.basetempactionobjectList[eg][4]; } for (var eg = 0; eg < this.basetempactionobjectList.length; eg++) { this.basetempactionobjectList[eg][1] -= minx; this.basetempactionobjectList[eg][2] -= miny; this.basetempactionobjectList[eg][3] -= minx; this.basetempactionobjectList[eg][4] -= miny } var width = maxx - minx; var height = maxy - miny; //if ($debug) Debug.info("## 1 ## NEW x,y ",minx,miny," width,height: ",width,height); if (width < 2 && height < 2) { //if ($debug) Debug.info("Add minimum size of Painting Line"); if (this.basetempactionobjectList.length > 0) { var lastPoint = this.basetempactionobjectList[this.basetempactionobjectList.length - 1]; var actionObject = new Array(); actionObject[0] = 'point'; actionObject[1] = lastPoint[3]; actionObject[2] = lastPoint[4]; actionObject[3] = lastPoint[3] + 2; actionObject[4] = lastPoint[4] + 2; this.basetempactionobjectList.push(actionObject); } else { //if ($debug) Debug.info("## 2 ## CURRENT width,height ",this.width,this.height); minx = this.startx; miny = this.starty; var actionObject = new Array(); actionObject[0] = 'point'; actionObject[1] = 0; actionObject[2] = 0; actionObject[3] = 2; actionObject[4] = 2; this.basetempactionobjectList.push(actionObject); width = 2; height = 2; } } if (this.isSnapToGrid) { xgrid = Math.round((minx - 1) / this.gridWidth) * this.gridWidth; ygrid = Math.round((miny - 1) / this.gridWidth) * this.gridWidth; this.currentlayer = new lz.drawViewNew(this, { name : tempName, x : xgrid, y : ygrid, width : width, height : height, opacity : this.currentlayerOpacity }); } else { this.currentlayer = new lz.drawViewNew(this, { name : tempName, x : minx - 1, y : miny - 1, width : width, height : height, opacity : this.currentlayerOpacity }); } this.currentlayer.fillstyle = '0x000000'; this.currentlayer.lineWidth = this.currentlayerlineWidth; this.currentlayer.strokeStyle = this.currentlayerstroke; for (var eg = 0; eg < this.basetempactionobjectList.length; eg++) this.drawline(this.basetempactionobjectList[eg][1], this.basetempactionobjectList[eg][2], this.basetempactionobjectList[eg][3], this.basetempactionobjectList[eg][4]); //this.currentlayer.setAttribute('stretches','both'); //Add Layer to global Layer this.layers.push(this.currentlayer); this.registerFinal(this.getSWFDocumentStatus(), this.getZIndex()); ]]> var actionObject = new Array(); actionObject[0] = 'paint'; actionObject[1] = this.basetempactionobjectList; actionObject[2] = currentlayer.fillstyle; actionObject[3] = currentlayer.lineWidth; actionObject[4] = currentlayer.strokeStyle; actionObject[5] = this.currentlayerOpacity; actionObject[6] = zIndex;//-8 actionObject[7] = swfObj;//-7 actionObject[8] = this.counter;//-6 actionObject[9] = currentlayer.x;//-5 actionObject[10] = currentlayer.y;//-4 actionObject[11] = currentlayer.width;//-3 actionObject[12] = currentlayer.height;//-2 actionObject[13] = this.currentlayer.name;//-1 if ($debug) Debug.write("registerFinal :: ", actionObject); this.baseactionobjectList.push(actionObject); this.onsharedMessage('draw', actionObject);