ࡱ> snRoot Entryp|YrRASH |7u,Contents `Page 1FSymbol 29}r !topqvwxyz{|}~Root Entryp|YrRASHGLbf ,Contents e`Page 1AFSymbol 29}  " !#$'*)(&%@,-./0123456789:;<=>?BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfghijklmSymbol 22 Symbol 21 Rl Symbol 13NSymbol 1 HSSymbol 28+)Symbol 25TSymbol 24Symbol 23Symbol 30 Symbol 318  !"#$%&'()*+,-./012356789:;<=>?@ACDEFGIJKLMOPQSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Symbol 2BVSymbol 174_Symbol 18 @Symbol 19vCPicPage CPicLayer CPicFrame 3f2 ˀ0n>ʀF0@(E>505?0?׀逹? n>ʀF0@(E>505?0?׀逹ˀ?Layer 1OCPicPage CPicLayer CPicFrame CPicButtonwon(release){ var str=this._url; var strArr=str.split("."); strArr[1]="zip"; str=strArr.join("."); getURL(str); }?Layer 1OCPicTextJm ,Verdana"(download fla?Layer 2OOCPicPage CPicLayer CPicFrame  +3f:]]8D4g]<8t{;E4t-E;8S{;4]fE8g?  +D4g]<8t{;E4t-E;8S{;4]fE8g4]]?Layer 1OCPicPage CPicLayer CPicFrame*L&C 4d_Ip"818$r78<4lz8K̛j=8U+ـ #aԀ݀NtJ aw8 /_倜4F28:u[49 81B408!54XIpC %  qV8 Fݺv8Ɏ8E F8Ȏt8ɺEX8 qVt8޺ȺvX?*d_Ip"818$r78<4lz8K̛j=8U+ـ #aԀ݀NtJ aw8 /_倜4F28:u[49 81B408!54XIpC %&C   qV8 Fݺv8Ɏ8E F8Ȏt8ɺEX8 qVt8޺ȺvX?Layer 1OCPicPage CPicLayer CPicFrame CPicButtonon (press) { rotating = true; oldangle = (180/Math.PI)*Math.atan2(_ymouse, _xmouse); } on (release,dragOut,rollOut) { //rotating = false; } ?Layer 2OO00yon (press) { dragging = true; oldX = _xmouse; oldY = _ymouse; } on (release,dragOut) { //dragging = false; } ?Layer 1OCPicPage CPicLayer CPicFrame CPicSpriteface?Layer 5OCPicPage CPicLayer CPicFrame CPicSpritemc?Layer 1OCPicPage CPicLayer CPicFrame?Layer 1OCPicPage CPicLayer CPicFrame ?stop();Layer 2OO CPicButtonJJJJon(press){ _root.sqDragging=true; _root.dragSqObj=this; _root.sqX=this._xmouse; _root.sqY=this._ymouse; } on(release){ _root.sqDragging=false; }  ?Layer 3OO((00(0(? CPicShapep(0(00?s((000(?s(0(0(0CPicPage CPicLayer CPicFrame3d P0P0<0(0<00(x 0<(3P3<3P0x( 0(< <<P?Layer 1ON0(0(00<P0<00(00xP03<0(03< (<0(x<(<?Layer 2OON0(0(00<P0<0( <0(03x00(< (0<0( 3<0Px(?Layer 3OOfvN0P0<0(03<3( <0(03<P00x0( x00(< (<3 (0<3((?Layer 43N0xP0x 0(x0((<0(0<P0<0P< (0<(<0( <3?Layer 5O0xP0x 0(x0((<0(0<P0<0P< (0<(<0( <3?Layer 6OCPicText Arial3"(p3A Arial3"(p21 Arial3"(p0i  Arial3"(p1!m Arial3"(p6 Arial3"(p75 Arial3"(p5: Arial3"(p4 Arial3"(p7y Arial3"(p6:5 Arial3"(p7& Arial3"(p4  Arial3"(p4y Arial3"(p5b) Arial3"(sq0= Arial3"(1% Arial3"(2N Arial3"(3 Arial3"(4 Arial3"(5& Arial3"(6 Arial3"(7% Arial3"(8?Layer 7O E >Arial3"(clip sequence:BWGYRO 012345?Layer 8 ?(0(0(0?p(0(00?(0(00??((00(0(?Layer 1O#?0??(0tc#?Layer 43< sq4sq0?Layer 1O CPicPage CPicLayer CPicFrame CPicSprite////"(p5]  Arial3"(p4* Arial3"(p3  Arial3"(p2 Arial3"(p1f 0K0DCPicPage CPicLayer CPicFrame CPicSprite<<sq5< < sq2<<sq7<<<<sq8<<sq6CPicPage CPicLayer CPicFrameCPicText Arial3"(p0 Arial3"(p7 Arial3"(p6U Arial30440030rJy0X3b0003\1H0?Layer 1Osq3  sq1obj?Layer 1Oocedure I should shift the color arrayCPicPage CPicLayer CPicFrame?l(000(CPicPage CPicLayer CPicFramefwdst0_parent.rotDir1repeat<0_parent.rotDir-1 totalCount2endAngle repeat*90dAngle(endAngle-sumAngle)/totalCountcount0fixtrue fix)_root.rotateCube(dAngle))count++count>=totalCountfixfalse_parent.repeatrepeat),_parent.gotoAndPlay(_parent._currentFrame+1) fixRotator? ?   sumAngle_parent.sumAnglerepeatMath.round(sumAngle/90);repeat is how many procedure I should shift the color array_parent.rotDir0repeat>0_parent.rotDir1repeat<0_parent.rotDir-1 totalCount2endAngle repeat*90dAngle(endAngle-sumAngle)/totalCountcount0fixtrue fix)_root.rotateCube(dAngle))count++count>=totalCountfixfalse_parent.repeatrepeat),_parent.gotoAndPlay(_parent._currentFrame+1) fixRotator?Layer 1O?_root.cube.swapDepths(2); duplicateMovieClip(_root.cube,"cube1",4); duplicateMovieClip(_root.cube,"cube2",6); cube=_root.cube; cube1=_root.cube1; cube2=_root.cube2; ?1stop (); _root.cube.cut._visible = false; _root.cube.cut2._visible=false; _root.cube1._visible = false; _root.cube1.cut._visible=false; _root.cube1.cut2._visible=false; _root.cube2._visible = false; //_root.cube.cut._visible = false; rotateType = -1; // there is rotate Type 0, but no -1; ?4make cube 1 rotatiion as cubecube1.resetRotate();)_root.cube.resetRotate())_root.cube.redoRotate() cube1.anglex_root.cube.anglex cube1.angley_root.cube.angley cube1.anglez_root.cube.anglez)_root.copyRotate(cube, cube1)cube1.redoRotate();cube1.updateClip();#*********************************//0cut cube1 and cube to two pieces and copy colors#*********************************//=I need to redo color gotoframe after I change my mask frame !rotate around orange,that is type 1 rotate, clip is green clip[5]1check the center of orange, if negative then swapGadd two grey plane; (set the plane need codes);(paralell to the green);)_root.hideAllBlock(_root.cube1))-_root.copyColorBlock(cube, cube1, rotateType))!_root.hideBlock(cube, rotateType)*****************************//prepare the grey cut plane ******************************//,There are two cut surface we need to create;)cube.updateClip()'clip = cube["obj"+rotateType]================= clip._visible)cube.swapDepths(2))cube1.swapDepths(4))cube.swapDepths(4))cube1.swapDepths(2) ******************************//cube1._visibletrue)cube1.updateClip()--------------------------cube.cut._visible clip._visiblecube.cut._visible'reg = clip.reg'pt02 = reg.mirP):_root.skewObj(cube.cut, 100, 100, reg.pt0, reg.pH, reg.pW))(cube.cut._x += (pt02.x-clip.reg.pt0.x)/3)(cube.cut._y += (pt02.y-clip.reg.pt0.y)/3)_root.type1RotateCut()!_root.trackBall._visible = false;rotDir0-rotDir is for color array shiftting directionrotatingtrue?+fix rotation not stay in intermediate angle?q// _root.trackBall._visible=true; // reset cube mask select cube.cut._visible = false; // swap and rotate colors of cube 1; if (rotateType>-1) { for (var k = 0; k<(repeat*rotDir); k++) { _root.rotateColor(rotateType, rotDir); } } _root.copyColorBlock(cube1, cube, rotateType); gotoAndStop (2); rotating=false; // back to original not rotatable state ?`make cube 1 rotatiion as cubecube1.resetRotate();cube2.resetRotate();)_root.cube.resetRotate() cube1.anglex_root.cube.anglex cube1.angley_root.cube.angley cube1.anglez_root.cube.anglez cube2.anglex_root.cube.anglex cube2.angley_root.cube.angley cube2.anglez_root.cube.anglez)_root.cube.redoRotate()cube1.redoRotate();cube2.redoRotate();)_root.copyRotate(cube, cube1))_root.copyRotate(cube, cube2)cube1.updateClip();#*********************************//0cut cube1 and cube to two pieces and copy colors#*********************************//=I need to redo color gotoframe after I change my mask frame !rotate around orange,that is type 1 rotate, clip is green clip[5]1check the center of orange, if negative then swapGadd two grey plane; (set the plane need codes);(paralell to the green);rotateType == 5 mirrorType4rotateType == 0 mirrorType2rotateType == 3 mirrorType1)_root.copyColor(cube, cube1))_root.hideAllBlock(_root.cube2))_root.hideAllBlock(_root.cube)###################Ychange the cube 2 and color block;rotateCube is rotate cube 1, so cube and cube2 is still###################._root.copyColorBlock(cube, cube1, rotateType);)._root.copyColorBlock(cube1, cube2, rotateType))"_root.hideBlock(cube1, rotateType)"_root.hideBlock(cube, rotateType);)-_root.copyColorBlock(cube1, cube, mirrorType))"_root.hideBlock(cube1, mirrorType):trace("rotateType="+rotateType+",mirrorType="+mirrorType);cube._visible=false;cube1._visibletruecube2._visibletrue)cube.updateClip()-duplicate cube2 must be done at earlier stage*****************************//prepare the grey cut plane ******************************//,There are two cut surface we need to create;'clip = cube["obj"+mirrorType]'clip2 = cube2["obj"+rotateType]cube.cut2._visible=false;=================!clip._visible)cube.swapDepths(2))cube1.swapDepths(4))cube2.swapDepths(6))cube.swapDepths(6))cube1.swapDepths(4))cube2.swapDepths(2) ******************************//cube.updateClip();)cube1.updateClip())cube2.updateClip()cube.cut._visible!clip._visiblecube.cut._visible'reg = clip.reg'pt02 = reg.mirP):_root.skewObj(cube.cut, 100, 100, reg.pt0, reg.pH, reg.pW))(cube.cut._x += (pt02.x-clip.reg.pt0.x)/3)(cube.cut._y += (pt02.y-clip.reg.pt0.y)/3cube2.cut2._visible=false;cube2.cut._visible clip._visiblecube2.cut._visible'reg = clip2.reg'pt02 = reg.mirP);_root.skewObj(cube2.cut, 100, 100, reg.pt0, reg.pH, reg.pW))*cube2.cut._x += (pt02.x-clip2.reg.pt0.x)/3)*cube2.cut._y += (pt02.y-clip2.reg.pt0.y)/3)_root.type2Rotatecut()------------------cube1._visible = true;!_root.trackBall._visible = false;rotDir0-rotDir is for color array shiftting directionrotatingtrue?+fix rotation not stay in intermediate angle?// _root.trackBall._visible=true; // reset cube mask select cube.cut._visible = false; // swap and rotate colors of cube 1; // #################### // rotate cube1 color; if (rotateType>-1) { for (var k = 0; k<(repeat*rotDir); k++) { _root.rotateColor2(rotateType, rotDir); } } _root.copyColorBlock(cube, cube1, mirrorType); _root.copyColorBlock(cube2, cube1, rotateType); _root.copyColor(cube1, cube); // stop(); // trace(_currentFrame); gotoAndStop (2); rotating=false; // back to original not rotatable state actions playerOOcube1.resetRotate(); rotateType = player.rotateType; if (rotateType == 4) { _root.groupRotateZ(cube1.pointArray, 0-angle); } else if (rotateType == 5) { _root.groupRotateZ(cube1.pointArray, angle); } else if (rotateTyp?Layer 1OArray, angle); } else if (rotateType == 1) { _root.groupRotateY(cube1.pointArray, angle); } else { _root.groupRotateY(cube1.pointArray, 0-angle); } cube1.redoRotate(); // after rotate the angle , rotate back to original angle cube1.updateClip(); // repaint the cut surface if (_root.player._currentFrame>10) { type2RotateCut(); } else { type1RotateCut(); CPicPage CPicLayer CPicFrame??stop();actions?function copyColor (cube, cube1) { for (var k = 0; k<6; k++) { for (var m = 0; m<9; m++) { var n = cube.clipArray[k].mc.face["sq"+m]._currentFrame; cube1.clipArray[k].mc.face["sq"+m].gotoAndStop(n); } } } function rotateCube (angle) { // rotate the specific half block of cube1 // first by set it in neutral with face 5 enface and then rotate cube1.resetRotate(); rotateType = player.rotateType; if (rotateType == 4) { _root.groupRotateZ(cube1.pointArray, 0-angle); } else if (rotateType == 5) { _root.groupRotateZ(cube1.pointArray, angle); } else if (rotateType == 0) { _root.groupRotateX(cube1.pointArray, 0-angle); } else if (rotateType == 2) { _root.groupRotateX(cube1.pointArray, angle); } else if (rotateType == 1) { _root.groupRotateY(cube1.pointArray, angle); } else { _root.groupRotateY(cube1.pointArray, 0-angle); } cube1.redoRotate(); // after rotate the angle , rotate back to original angle cube1.updateClip(); // repaint the cut surface if (_root.player._currentFrame>10) { type2RotateCut(); } else { type1RotateCut(); } } function type1RotateCut () { rotateType = player.rotateType; var clip = cube1["obj"+rotateType]; if (!clip._visible) { cube1.cut._visible = true; var reg = clip.reg; var pt02 = reg.mirP; _root.skewObj(cube1.cut, 100, 100, reg.pt0, reg.pH, reg.pW); cube1.cut._x += (pt02.x-clip.reg.pt0.x)/3; cube1.cut._y += (pt02.y-clip.reg.pt0.y)/3; // cube1.cut._visible=!clip._visible; } } function type2RotateCut () { rotateType = player.rotateType; mirrorType = player.mirrorType; var clip = cube["obj"+mirrorType]; cube1.cut._visible = clip._visible; // rotating interface between cube1 and cube if (cube1.cut._visible) { var clip3 = cube1["obj"+mirrorType]; var reg = clip3.reg; var pt02 = reg.mirP; _root.skewObj(cube1.cut, 100, 100, reg.pt0, reg.pH, reg.pW); cube1.cut._x += (pt02.x-clip3.reg.pt0.x)/3; cube1.cut._y += (pt02.y-clip3.reg.pt0.y)/3; } cube1.cut2._visible = !clip._visible; // rotating interface between cube1 and cube2 if (cube1.cut2._visible) { var clip4 = cube1["obj"+rotateType]; var reg = clip4.reg; var pt02 = reg.mirP; _root.skewObj(cube1.cut2, 100, 100, reg.pt0, reg.pH, reg.pW); cube1.cut2._x += (pt02.x-clip4.reg.pt0.x)/3; cube1.cut2._y += (pt02.y-clip4.reg.pt0.y)/3; } } // x type: when drag mouse to a squre along x axis, what rotation it would result ? // I make -4 to -14, just because I need -0, to I make it -10; // 0 is not movable. y type is drag along y axis Xtype = new Array(); Xtype[0] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[1] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[2] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[3] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[4] = [-13, -13, -13, -23, -23, -23, 11, 11, 11]; Xtype[5] = [-11, -11, -11, 23, 23, 23, 13, 13, 13]; Ytype = new Array(); Ytype[0] = [13, 23, -11, 13, 23, -11, 13, 23, -11]; Ytype[1] = [10, 20, -12, 10, 20, -12, 10, 20, -12]; Ytype[2] = [11, -23, -13, 11, -23, -13, 11, -23, -13]; Ytype[3] = [12, -20, -10, 12, -20, -10, 12, -20, -10]; Ytype[4] = [10, 20, -12, 10, 20, -12, 10, 20, -12]; Ytype[5] = [10, 20, -12, 10, 20, -12, 10, 20, -12]; // 0 no move, + show clockwise, - show counterClockwise, // type=10+rotate type,number:rotateType,obj,-squre,for drag // ======================= function rotateColor (rotateType, dir) { var faceRot = cube1.faceRing(rotateType); var ringRot = cube1["Ring"+rotateType]; var faceTemp = new Array(); for (var k = 0; k0) { tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); } if (dir<0) { tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); } for (var k = 0; k0) { tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); } if (dir<0) { tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); } for (var k = 0; k0) { tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); } if (dir<0) { tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); } for (var k = 0; kMath.abs(dy)shift _root.Xtypeshift _root.Ytypeset rotate and dirmode'(sqN = _root.dragSqObj._name.substr(2, 1)'1objN = _root.dragSqObj._parent._parent._parent.idtrace("objN="+objN);'rotNum = shift[objN][sqN]trace ("rotNum="+rotNum);rotNum>0dir1 rotateType (rotNum%10)rotNum<0dir-1 rotateType(0-(rotNum%10))?@ACDEFGIJKLMOPQSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Symbol 2BVSymbol 174_Symbol 18 @Symbol 19vCPicPage CPicLayer CPicFrame 3f2 ˀ0n>ʀF0@(E>505?0?׀逹? n>ʀF0@(E>505?0?׀逹ˀ?Layer 1OCPicPage CPicLayer CPicFrame CPicButtonwon(release){ var str=this._url; var strArr=str.split("."); strArr[1]="zip"; str=strArr.join("."); getURL(str); }?Layer 1OCPicTextJm ,Verdana"(download fla?Layer 2OOCPicPage CPicLayer CPicFrame  +3f:]]8D4g]<8t{;E4t-E;8S{;4]fE8g?  +D4g]<8t{;E4t-E;8S{;4]fE8g4]]?Layer 1OCPicPage CPicLayer CPicFrame*L&C 4d_Ip"818$r78<4lz8K̛j=8U+ـ #aԀ݀NtJ aw8 /_倜4F28:u[49 81B408!54XIpC %  qV8 Fݺv8Ɏ8E F8Ȏt8ɺEX8 qVt8޺ȺvX?*d_Ip"818$r78<4lz8K̛j=8U+ـ #aԀ݀NtJ aw8 /_倜4F28:u[49 81B408!54XIpC %&C   qV8 Fݺv8Ɏ8E F8Ȏt8ɺEX8 qVt8޺ȺvX?Layer 1OCPicPage CPicLayer CPicFrame CPicButtonon (press) { rotating = true; oldangle = (180/Math.PI)*Math.atan2(_ymouse, _xmouse); } on (release,dragOut,rollOut) { //rotating = false; } ?Layer 2OO00yon (press) { dragging = true; oldX = _xmouse; oldY = _ymouse; } on (release,dragOut) { //dragging = false; } ?Layer 1OCPicPage CPicLayer CPicFrame CPicSpriteface?Layer 5OCPicPage CPicLayer CPicFrame CPicSpritemc?Layer 1OCPicPage CPicLayer CPicFrame?Layer 1OCPicPage CPicLayer CPicFrame ?stop();Layer 2OO CPicButtonJJJJon(press){ _root.sqDragging=true; _root.dragSqObj=this; _root.sqX=this._xmouse; _root.sqY=this._ymouse; } on(release){ _root.sqDragging=false; }  ?Layer 3OO((00(0(? CPicShapep(0(00?s((000(?s(0(0(0?(0(0(0?p(0(00?(0(00??((00(0(?Layer 1O#?0??(#F0?Layer 43< sq4sq0?Layer 1OobjCPicPage CPicLayer CPicFrame CPicSprite////CPicPage CPicLayer CPicFrame CPicSprite<<sq5< < sq2<<sq7<<<<sq8<<sq6CPicPage CPicLayer CPicFrameCPicText Arial3"(p0 Arial3"(p7 Arial3"(p6U Arial30440030rJy0X3b0003\1H0?Layer 1Osq3  sq1obj?Layer 1OCPicPage CPicLayer CPicFrame?00(0(CPicPage CPicLayer CPicFramefwdst0_parent.rotDir1repeat<0_parent.rotDir-1 totalCount2endAngle repeat*90dAngle(endAngle-sumAngle)/totalCountcount0fixtrue fix)_root.rotateCube(dAngle))count++count>=totalCountfixfalse_parent.repeatrepeat),_parent.gotoAndPlay(_parent._currentFrame+1) fixRotator? ?   sumAngle_parent.sumAnglerepeatMath.round(sumAngle/90);repeat is how many procedure I should shift the color array_parent.rotDir0repeat>0_parent.rotDir1repeat<0_parent.rotDir-1 totalCount2endAngle repeat*90dAngle(endAngle-sumAngle)/totalCountcount0fixtrue fix)_root.rotateCube(dAngle))count++count>=totalCountfixfalse_parent.repeatrepeat),_parent.gotoAndPlay(_parent._currentFrame+1) fixRotator?Layer 1O?_root.cube.swapDepths(2); duplicateMovieClip(_root.cube,"cube1",4); duplicateMovieClip(_root.cube,"cube2",6); cube=_root.cube; cube1=_root.cube1; cube2=_root.cube2; ?1stop (); _root.cube.cut._visible = false; _root.cube.cut2._visible=false; _root.cube1._visible = false; _root.cube1.cut._visible=false; _root.cube1.cut2._visible=false; _root.cube2._visible = false; //_root.cube.cut._visible = false; rotateType = -1; // there is rotate Type 0, but no -1; ?4make cube 1 rotatiion as cubecube1.resetRotate();)_root.cube.resetRotate())_root.cube.redoRotate() cube1.anglex_root.cube.anglex cube1.angley_root.cube.angley cube1.anglez_root.cube.anglez)_root.copyRotate(cube, cube1)cube1.redoRotate();cube1.updateClip();#*********************************//0cut cube1 and cube to two pieces and copy colors#*********************************//=I need to redo color gotoframe after I change my mask frame !rotate around orange,that is type 1 rotate, clip is green clip[5]1check the center of orange, if negative then swapGadd two grey plane; (set the plane need codes);(paralell to the green);)_root.hideAllBlock(_root.cube1))-_root.copyColorBlock(cube, cube1, rotateType))!_root.hideBlock(cube, rotateType)*****************************//prepare the grey cut plane ******************************//,There are two cut surface we need to create;)cube.updateClip()'clip = cube["obj"+rotateType]================= clip._visible)cube.swapDepths(2))cube1.swapDepths(4))cube.swapDepths(4))cube1.swapDepths(2) ******************************//cube1._visibletrue)cube1.updateClip()--------------------------cube.cut._visible clip._visiblecube.cut._visible'reg = clip.reg'pt02 = reg.mirP):_root.skewObj(cube.cut, 100, 100, reg.pt0, reg.pH, reg.pW))(cube.cut._x += (pt02.x-clip.reg.pt0.x)/3)(cube.cut._y += (pt02.y-clip.reg.pt0.y)/3)_root.type1RotateCut()!_root.trackBall._visible = false;rotDir0-rotDir is for color array shiftting directionrotatingtrue?+fix rotation not stay in intermediate angle?q// _root.trackBall._visible=true; // reset cube mask select cube.cut._visible = false; // swap and rotate colors of cube 1; if (rotateType>-1) { for (var k = 0; k<(repeat*rotDir); k++) { _root.rotateColor(rotateType, rotDir); } } _root.copyColorBlock(cube1, cube, rotateType); gotoAndStop (2); rotating=false; // back to original not rotatable state ?`make cube 1 rotatiion as cubecube1.resetRotate();cube2.resetRotate();)_root.cube.resetRotate() cube1.anglex_root.cube.anglex cube1.angley_root.cube.angley cube1.anglez_root.cube.anglez cube2.anglex_root.cube.anglex cube2.angley_root.cube.angley cube2.anglez_root.cube.anglez)_root.cube.redoRotate()cube1.redoRotate();cube2.redoRotate();)_root.copyRotate(cube, cube1))_root.copyRotate(cube, cube2)cube1.updateClip();#*********************************//0cut cube1 and cube to two pieces and copy colors#*********************************//=I need to redo color gotoframe after I change my mask frame !rotate around orange,that is type 1 rotate, clip is green clip[5]1check the center of orange, if negative then swapGadd two grey plane; (set the plane need codes);(paralell to the green);rotateType == 5 mirrorType4rotateType == 0 mirrorType2rotateType == 3 mirrorType1)_root.copyColor(cube, cube1))_root.hideAllBlock(_root.cube2))_root.hideAllBlock(_root.cube)###################Ychange the cube 2 and color block;rotateCube is rotate cube 1, so cube and cube2 is still###################._root.copyColorBlock(cube, cube1, rotateType);)._root.copyColorBlock(cube1, cube2, rotateType))"_root.hideBlock(cube1, rotateType)"_root.hideBlock(cube, rotateType);)-_root.copyColorBlock(cube1, cube, mirrorType))"_root.hideBlock(cube1, mirrorType):trace("rotateType="+rotateType+",mirrorType="+mirrorType);cube._visible=false;cube1._visibletruecube2._visibletrue)cube.updateClip()-duplicate cube2 must be done at earlier stage*****************************//prepare the grey cut plane ******************************//,There are two cut surface we need to create;'clip = cube["obj"+mirrorType]'clip2 = cube2["obj"+rotateType]cube.cut2._visible=false;=================!clip._visible)cube.swapDepths(2))cube1.swapDepths(4))cube2.swapDepths(6))cube.swapDepths(6))cube1.swapDepths(4))cube2.swapDepths(2) ******************************//cube.updateClip();)cube1.updateClip())cube2.updateClip()cube.cut._visible!clip._visiblecube.cut._visible'reg = clip.reg'pt02 = reg.mirP):_root.skewObj(cube.cut, 100, 100, reg.pt0, reg.pH, reg.pW))(cube.cut._x += (pt02.x-clip.reg.pt0.x)/3)(cube.cut._y += (pt02.y-clip.reg.pt0.y)/3cube2.cut2._visible=false;cube2.cut._visible clip._visiblecube2.cut._visible'reg = clip2.reg'pt02 = reg.mirP);_root.skewObj(cube2.cut, 100, 100, reg.pt0, reg.pH, reg.pW))*cube2.cut._x += (pt02.x-clip2.reg.pt0.x)/3)*cube2.cut._y += (pt02.y-clip2.reg.pt0.y)/3)_root.type2Rotatecut()------------------cube1._visible = true;!_root.trackBall._visible = false;rotDir0-rotDir is for color array shiftting directionrotatingtrue?+fix rotation not stay in intermediate angle?// _root.trackBall._visible=true; // reset cube mask select cube.cut._visible = false; // swap and rotate colors of cube 1; // #################### // rotate cube1 color; if (rotateType>-1) { for (var k = 0; k<(repeat*rotDir); k++) { _root.rotateColor2(rotateType, rotDir); } } _root.copyColorBlock(cube, cube1, mirrorType); _root.copyColorBlock(cube2, cube1, rotateType); _root.copyColor(cube1, cube); // stop(); // trace(_currentFrame); gotoAndStop (2); rotating=false; // back to original not rotatable state actions playerOO?Layer 1O?stop();actions?function copyColor (cube, cube1) { for (var k = 0; k<6; k++) { for (var m = 0; m<9; CPicPage CPicLayer CPicFrame??stop();actions?function copyColor (cube, cube1) { for (var k = 0; k<6; k++) { for (var m = 0; m<9; m++) { var n = cube.clipArray[k].mc.face["sq"+m]._currentFrame; cube1.clipArray[k].mc.face["sq"+m].gotoAndStop(n); } } } function rotateCube (angle) { // rotate the specific half block of cube1 // first by set it in neutral with face 5 enface and then rotate cube1.resetRotate(); rotateType = player.rotateType; if (rotateType == 4) { _root.groupRotateZ(cube1.pointArray, 0-angle); } else if (rotateType == 5) { _root.groupRotateZ(cube1.pointArray, angle); } else if (rotateType == 0) { _root.groupRotateX(cube1.pointArray, 0-angle); } else if (rotateType == 2) { _root.groupRotateX(cube1.pointArray, angle); } else if (rotateType == 1) { _root.groupRotateY(cube1.pointArray, angle); } else { _root.groupRotateY(cube1.pointArray, 0-angle); } cube1.redoRotate(); // after rotate the angle , rotate back to original angle cube1.updateClip(); // repaint the cut surface if (_root.player._currentFrame>10) { type2RotateCut(); } else { type1RotateCut(); } } function type1RotateCut () { rotateType = player.rotateType; var clip = cube1["obj"+rotateType]; if (!clip._visible) { cube1.cut._visible = true; var reg = clip.reg; var pt02 = reg.mirP; _root.skewObj(cube1.cut, 100, 100, reg.pt0, reg.pH, reg.pW); cube1.cut._x += (pt02.x-clip.reg.pt0.x)/3; cube1.cut._y += (pt02.y-clip.reg.pt0.y)/3; // cube1.cut._visible=!clip._visible; } } function type2RotateCut () { rotateType = player.rotateType; mirrorType = player.mirrorType; var clip = cube["obj"+mirrorType]; cube1.cut._visible = clip._visible; // rotating interface between cube1 and cube if (cube1.cut._visible) { var clip3 = cube1["obj"+mirrorType]; var reg = clip3.reg; var pt02 = reg.mirP; _root.skewObj(cube1.cut, 100, 100, reg.pt0, reg.pH, reg.pW); cube1.cut._x += (pt02.x-clip3.reg.pt0.x)/3; cube1.cut._y += (pt02.y-clip3.reg.pt0.y)/3; } cube1.cut2._visible = !clip._visible; // rotating interface between cube1 and cube2 if (cube1.cut2._visible) { var clip4 = cube1["obj"+rotateType]; var reg = clip4.reg; var pt02 = reg.mirP; _root.skewObj(cube1.cut2, 100, 100, reg.pt0, reg.pH, reg.pW); cube1.cut2._x += (pt02.x-clip4.reg.pt0.x)/3; cube1.cut2._y += (pt02.y-clip4.reg.pt0.y)/3; } } // x type: when drag mouse to a squre along x axis, what rotation it would result ? // I make -4 to -14, just because I need -0, to I make it -10; // 0 is not movable. y type is drag along y axis Xtype = new Array(); Xtype[0] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[1] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[2] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[3] = [-14, -14, -14, 25, 25, 25, 15, 15, 15]; Xtype[4] = [-13, -13, -13, -23, -23, -23, 11, 11, 11]; Xtype[5] = [-11, -11, -11, 23, 23, 23, 13, 13, 13]; Ytype = new Array(); Ytype[0] = [13, 23, -11, 13, 23, -11, 13, 23, -11]; Ytype[1] = [10, 20, -12, 10, 20, -12, 10, 20, -12]; Ytype[2] = [11, -23, -13, 11, -23, -13, 11, -23, -13]; Ytype[3] = [12, -20, -10, 12, -20, -10, 12, -20, -10]; Ytype[4] = [10, 20, -12, 10, 20, -12, 10, 20, -12]; Ytype[5] = [10, 20, -12, 10, 20, -12, 10, 20, -12]; // 0 no move, + show clockwise, - show counterClockwise, // type=10+rotate type,number:rotateType,obj,-squre,for drag // ======================= function rotateColor (rotateType, dir) { var faceRot = cube1.faceRing(rotateType); var ringRot = cube1["Ring"+rotateType]; var faceTemp = new Array(); for (var k = 0; k0) { tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); } if (dir<0) { tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); } for (var k = 0; k0) { tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); } if (dir<0) { tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); } for (var k = 0; k0) { tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); tmp = faceTemp.pop(); faceTemp.unshift(tmp); } if (dir<0) { tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); tmp = faceTemp.shift(); faceTemp.push(tmp); } for (var k = 0; kMath.abs(dy)shift _root.Xtypeshift _root.Ytypeset rotate and dirmode'(sqN = _root.dragSqObj._name.substr(2, 1)'1objN = _root.dragSqObj._parent._parent._parent.idtrace("objN="+objN);'rotNum = shift[objN][sqN]trace ("rotNum="+rotNum);rotNum>0dir1 rotateType (rotNum%10)rotNum<0dir-1 rotateType(0-(rotNum%10))-->