User talk:Deepak bishukarma bika

//////////////////////////////////////////////// color cahange script insert in frame import flash.geom.ColorTransform; function changeColor(mc:MovieClip, nots:Number){ var ct:ColorTransform = new ColorTransform; ct.rgb = nots; mc.transform.colorTransform = ct; }

changeColor(circle_mc, 0xFF0000)

////////////////////////////////

flash AS 2.0 array
////////movieclip name outside text_one make a three button name btn1 + n/////  create dynamic text "question_txt" //////create dynamic three text answer1_txt stop; var qarray:Array = new Array; qarray[0] = "A primary key does not allow ........ Values.";

var twoDArray:Array = new Array(new Array("(a) Zero", "(b) Null", "(c) Numeric"));

var ans:Array = new Array; ans[0] = "(b) Null";

////////////////////////////////////////

function changeed { if (qarray.length == 0) { _root.play;

} else {

ranNum = random(qarray.length); question_txt.text = qarray[ranNum]; answer1_txt.text = twoDArray[ranNum][0]; answer2_txt.text = twoDArray[ranNum][1]; answer3_txt.text = twoDArray[ranNum][2]; answer4_txt.text = twoDArray[ranNum][3]; anscheck = ans[ranNum]; qarray.splice(ranNum,1); twoDArray.splice(ranNum,1); ans.splice(ranNum,1); } } changeed; function checkval1 { if (answer1_txt.text == anscheck) { _root.addpls++; trace(_root.score); trace("1 right right"); _parent.controlOn = true; /////////////////////		right._visible = 1; mc.gotoAndPlay(2); correct1_mc.gotoAndPlay(2);

/////////////////////	} else { trace("wrong"); wrong1_mc.gotoAndPlay(2); } } function checkval2 { if (answer2_txt.text == anscheck) { _root.addpls++; trace(_root.score); mc.gotoAndPlay(2); _parent.controlOn = true; correct1_mc.gotoAndPlay(2);

} else { trace("wrong"); wrong1_mc.gotoAndPlay(2); } } function checkval3 { if (answer3_txt.text == anscheck) { _root.addpls++; mc.gotoAndPlay(2); _parent.controlOn = true; correct1_mc.gotoAndPlay(2);

} else { trace("wrong"); wrong1_mc.gotoAndPlay(2); } } function checkval4 { if (answer4_txt.text == anscheck) { _root.addpls++; mc.gotoAndPlay(2); _parent.controlOn = true; correct1_mc.gotoAndPlay(2);

} else { trace("wrong"); wrong1_mc.gotoAndPlay(2); } }

btn1.onPress = function { checkval1; }; btn2.onPress = function { checkval2; }; btn3.onPress = function { checkval3; }; btn4.onPress = function { checkval4; };

AS 2.0 Blur movie clip
import flash.filters.DropShadowFilter; import flash.filters.BlurFilter; import flash.filters.GlowFilter;

var fltDropShadow = new DropShadowFilter(5, 45, 0xffff00, 1, 5, 5, 1, 3, false, false, false); var myGlowFilter = new GlowFilter (0x6699FF,0.6,40,20,3,3,false,false); var fltBlur = new BlurFilter(5, 5, 3);

my_mc_dropshadow.filters = [fltDropShadow]; myObject.filters = [myGlowFilter]; my_mc_blur.filters = [fltBlur]; alpha_mc._alpha = 50;

flash AS 2.0 puzzle game
///Deepak bika stop; var i:Number = 1; camel._visible = 0; m1m._visible = 0; m2m._visible = 0; m3m._visible = 0; m4m._visible = 0; m5m._visible = 0; m6m._visible = 0; m7m._visible = 0; m8m._visible = 0; m1._visible = 1; m2._visible = 1; m3._visible = 1; m4._visible = 1; m5._visible = 1; m6._visible = 1; m7._visible = 1; m8._visible = 1; m1x = getProperty(m1, _x); m1y = getProperty(m1, _y); m2x = getProperty(m2, _x); m2y = getProperty(m2, _y); m3x = getProperty(m3, _x); m3y = getProperty(m3, _y); m4x = getProperty(m4, _x); m4y = getProperty(m4, _y); m5x = getProperty(m5, _x); m5y = getProperty(m5, _y); m6x = getProperty(m6, _x); m6y = getProperty(m6, _y); m7x = getProperty(m7, _x); m7y = getProperty(m7, _y); m8x = getProperty(m8, _x); m8y = getProperty(m8, _y);

var a1 = 0; var a2 = 0; var a3 = 0; var a4 = 0; var a5 = 0; var a6 = 0; var a7 = 0; var a8 = 0;

function checkval1{ //tar1._name = "tar11"; tar2._name = "tar12"; tar3._name = "tar13"; tar4._name = "tar14"; tar5._name = "tar15"; tar6._name = "tar16"; tar7._name = "tar17"; tar8._name = "tar18"; }

/////////////////////////////////////////////

_root.Next_btn.onPress = function{ i++; _parent.gotoAndPlay(i); } _root.Next_btn._visible = 1; _root.Next_btn.enabled = 0;

var time:Number = 1; //clearInterval(countDown); function delay { time++; if (time == 2) { trace("okkkkkkkkk"); camel._visible = 1; camel.gotoAndPlay(2); _root.good._visible = 1; _root.good.gotoAndPlay(2);

_root.Next_btn._visible = 1; _root.Next_btn.enabled = 1; } }

///////////////////////////////////////////////

m1.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m1.onReleaseOutside = function { this.stopDrag; this._x = x;

this._y = y;	trace("val"+x); trace("mmm"+y); }; m1.onRelease = function { this.stopDrag; if (this.hitTest(tar1)) { trace("ooooo"); m1m._visible = 1; trace("dddd"); a1 = 1; m1._visible = 0; trace(a1); checkvalue; } else { //this._x = m1x; //		this._y = m1y; } };

m2.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m2.onReleaseOutside = function { this.stopDrag; this._x = x;

this._y = y;	trace("val"+x); trace("mmm"+y); }; m2.onRelease = function { this.stopDrag; if (this.hitTest(tar2)) { trace("ooooo"); m2m._visible = 1; trace("dddd"); m2._visible = 0; a2 = 1; trace(a2) checkvalue; } else { //this._x = m2x; //		this._y = m2y; } };

m3.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m3.onReleaseOutside = function { this.stopDrag; this._x = x;	this._y = y;	trace("val"+x); trace("mmm"+y); }; m3.onRelease = function { this.stopDrag; if (this.hitTest(tar3)) { trace("ooooo"); m3m._visible = 1; trace("dddd"); m3._visible = 0; a3 = 1; trace(a3) checkvalue; } else { //this._x = m3x; //		this._y = m3y; } };

m4.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m4.onReleaseOutside = function { this.stopDrag; this._x = x;	this._y = y;	trace("val"+x); trace("mmm"+y); }; m4.onRelease = function { this.stopDrag; if (this.hitTest(tar4)) { trace("ooooo"); m4m._visible = 1; trace("dddd"); m4._visible = 0; a4 = 1; trace(a4) checkvalue; } else { //this._x = m4x; //		this._y = m4y; } };

m5.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m5.onReleaseOutside = function { this.stopDrag; this._x = x;	this._y = y;	trace("val"+x); trace("mmm"+y); }; m5.onRelease = function { this.stopDrag; if (this.hitTest(tar5)) { trace("ooooo"); m5m._visible = 1; trace("dddd"); m5._visible = 0; a5 = 1; trace(a5) checkvalue; } else { //this._x = m5x; //		this._y = m5y; } };

m6.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m6.onReleaseOutside = function { this.stopDrag; this._x = x;	this._y = y;	trace("val"+x); trace("mmm"+y); }; m6.onRelease = function { this.stopDrag; if (this.hitTest(tar6)) { trace("ooooo"); m6m._visible = 1; trace("dddd"); m6._visible = 0; a6 = 1; trace(a6) checkvalue; } else { //this._x = m6x; //		this._y = m6y; } };

m7.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m7.onReleaseOutside = function { this.stopDrag; this._x = x;	this._y = y;	trace("val"+x); trace("mmm"+y); }; m7.onRelease = function { this.stopDrag; if (this.hitTest(tar7)) { trace("ooooo"); m7m._visible = 1; trace("dddd"); m7._visible = 0; a7 = 1; trace(a7) checkvalue; } else { //this._x = m7x; //		this._y = m7y; } };

m8.onPress = function{ x = this._x; y = this._y; startDrag(this, true, 10, 10, 1024, 768); }; m8.onReleaseOutside = function { this.stopDrag; this._x = x;	this._y = y;	trace("val"+x); trace("mmm"+y); }; m8.onRelease = function { this.stopDrag; if (this.hitTest(tar8)) { trace("ooooo"); m8m._visible = 1; trace("dddd"); m8._visible = 0; a8 = 1; trace(a8) checkvalue; } else { //this._x = m8x; //		this._y = m8y; } }; function checkvalue{ if(a1 == 1 && a2 == 1 && a3 == 1 && a4 == 1 && a5 == 1 && a6 == 1 && a7 == 1 && a8 == 1){ trace("goood") countDown = setInterval(delay, 500); //delay; } }

flash AS 2.0 tree random
onClipEvent (load) {   xgoal = 1216; xpos = 1216; setProperty("", _yscale, random(50) + 50); setProperty("", _xscale, random(60) + 50); } onClipEvent (enterFrame) {   _root.tree3._x = _x; space = xgoal - xpos; xpos = xpos + space / 10; setProperty("", _x, xpos); xgoal = xgoal - 20; _root.tree3 = xgoal; if (xgoal < -50) {   xgoal = 1216; xpos = 1216; } // end if }