Working hard to get a demo done by Monday…

Vodpod videos no longer available.

bg.sun.play();

inst_mc.play();
groundhog.visible=false;
hose.visible = false;

dogBtn.buttonMode=true;
cultBtn.buttonMode=true;

dog.addEventListener(MouseEvent.CLICK, onClickDog);
dogBtn.addEventListener(MouseEvent.CLICK, onClickDog);
relocateNavBtn.addEventListener(MouseEvent.CLICK, relocateWin);
HelpBtn.addEventListener(MouseEvent.CLICK,helpWin);

function helpWin(evt:MouseEvent):void {
inst_mc.visible=true;
inst_mc.play();
}

cultBtn.addEventListener(MouseEvent.CLICK, onClickCult);
cultBtn.addEventListener(MouseEvent.MOUSE_OVER, onCultOver);
cultBtn.addEventListener(MouseEvent.MOUSE_OUT, onCultOut);
spray2.addEventListener(MouseEvent.CLICK, onClickSpray2);
//sprayBtl.addEventListener(MouseEvent.CLICK, onClickSpray);
hose_btn1.addEventListener(MouseEvent.CLICK, onClickHose1);
//hose_btn2.addEventListener(MouseEvent.CLICK, onClickHose2);
btn5.addEventListener(MouseEvent.CLICK, onClickGH);
btn6.addEventListener(MouseEvent.CLICK, onClickDeer);
//hose.addEventListener(MouseEvent.CLICK, onClickDeer);
scarecrow_btn.addEventListener(MouseEvent.MOUSE_DOWN, onSCDown);
hose.addEventListener(MouseEvent.MOUSE_DOWN, onHoseDown);
//hose.addEventListener(MouseEvent.MOUSE_UP, onHoseUp);
scarecrow.addEventListener(MouseEvent.ROLL_OUT, onSCOut);

function onCultOver(evt:MouseEvent):void {
var ct:ColorTransform = new ColorTransform();
ct.greenMultiplier = 100;
ct.greenOffset = -10;
evt.currentTarget.btnBg.transform.colorTransform = ct;
}

function onCultOut(evt:MouseEvent):void {
evt.currentTarget.btnBg.transform.colorTransform = new ColorTransform();
}

function onClickCult(evt:MouseEvent):void {
Mouse.hide();
inst_mc.visible = false;
var cult:MovieClip = new Cult();
addChild(cult);
addEventListener (Event.ENTER_FRAME, onLoopCult);
function onLoopCult(evt:Event):void {
cult.x = mouseX
cult.y = mouseY
}
}
function onClickBeer(evt:MouseEvent):void {
Mouse.hide();
var beer:MovieClip = new Beer();
addChild(beer);
addEventListener (Event.ENTER_FRAME, onLoopBeer);
function onLoopBeer(evt:Event):void {
beer.x = mouseX
beer.y = mouseY
}
}

function onClickLadyBugs(evt:MouseEvent):void {
Mouse.hide();
var bugs:MovieClip = new ladyBugs();
addChild(bugs);
addEventListener (Event.ENTER_FRAME, onLoopBugs);
function onLoopBugs(evt:Event):void {
bugs.x = mouseX
bugs.y = mouseY
}
}

function onClickSpray2(evt:MouseEvent):void {
Mouse.hide();
var spray:MovieClip = new sprayBtl();
addChild(spray);
addEventListener (Event.ENTER_FRAME, onLoopSpray);
function onLoopSpray(evt:Event):void {
spray.x = mouseX
spray.y = mouseY
}
}

function onSCDown(evt:MouseEvent):void {
scarecrow.play();
}

function onSCOut(evt:MouseEvent):void {
scarecrow.stop();
}

function onClickDog(evt:MouseEvent):void {
var dog:MovieClip = new Dog();
dog.x = 260;
dog.y = 140;
deerB.DeerC.gotoAndStop(1);
dog.play();
crowAnim.play();
if (groundhog.visible==true) {
groundhog.gotoAndPlay(1);
}
}

function onClickHose1(evt:MouseEvent):void {
hose.visible = true;
}

function onHoseDown(evt:MouseEvent):void {
hose.gotoAndPlay(“spray”);
}

function onHoseUp(evt:MouseEvent):void {
hose.gotoAndPlay(“right”);
}

function relocateWin(evt:MouseEvent):void {
var relocate:MovieClip = new Relocate();
addChild(relocate);
relocate.x = 460;
relocate.y = 270;
}

function onClickGH(evt:MouseEvent):void {
groundhog.visible=true;
groundhog.play();
}

function onClickDeer(evt:MouseEvent):void {
deerB.play();
deerB.DeerC.gotoAndPlay(1);
}

weed1.addEventListener(MouseEvent.CLICK, onClick);
weed2.addEventListener(MouseEvent.CLICK, onClick);
weed3.addEventListener(MouseEvent.CLICK, onClick);
weed4.addEventListener(MouseEvent.CLICK, onClick);

//VEGIES
tomatoe1.addEventListener(MouseEvent.CLICK, onClick);
tomatoe2.addEventListener(MouseEvent.CLICK, onClick);
tomatoe3.addEventListener(MouseEvent.CLICK, onClick);
tomatoe4.addEventListener(MouseEvent.CLICK, onClick);
oregano1.addEventListener(MouseEvent.CLICK, onClick);
oregano2.addEventListener(MouseEvent.CLICK, onClick);
oregano3.addEventListener(MouseEvent.CLICK, onClick);
oregano4.addEventListener(MouseEvent.CLICK, onClick);
oregano5.addEventListener(MouseEvent.CLICK, onClick);
oregano6.addEventListener(MouseEvent.CLICK, onClick);
carrot1.addEventListener(MouseEvent.CLICK, onClick);
carrot2.addEventListener(MouseEvent.CLICK, onClick);
carrot3.addEventListener(MouseEvent.CLICK, onClick);
carrot4.addEventListener(MouseEvent.CLICK, onClick);
onion1.addEventListener(MouseEvent.CLICK, onClick);
onion2.addEventListener(MouseEvent.CLICK, onClick);
scallion1.addEventListener(MouseEvent.CLICK, onClick);
scallion2.addEventListener(MouseEvent.CLICK, onClick);
peas1.addEventListener(MouseEvent.CLICK, onClick);
peas2.addEventListener(MouseEvent.CLICK, onClick);
basil1.addEventListener(MouseEvent.CLICK, onClick);
basil2.addEventListener(MouseEvent.CLICK, onClick);
lettuce1.addEventListener(MouseEvent.CLICK, onClick);
lettuce2.addEventListener(MouseEvent.CLICK, onClick);
lettuce3.addEventListener(MouseEvent.CLICK, onClick);
lettuce4.addEventListener(MouseEvent.CLICK, onClick);
strawberry1.addEventListener(MouseEvent.CLICK, onClick);
strawberry2.addEventListener(MouseEvent.CLICK, onClick);
strawberry3.addEventListener(MouseEvent.CLICK, onClick);
strawberry4.addEventListener(MouseEvent.CLICK, onClick);
cabbage1.addEventListener(MouseEvent.CLICK, onClick);
cabbage2.addEventListener(MouseEvent.CLICK, onClick);
cabbage3.addEventListener(MouseEvent.CLICK, onClick);
cabbage4.addEventListener(MouseEvent.CLICK, onClick);
cabbage5.addEventListener(MouseEvent.CLICK, onClick);
cabbage6.addEventListener(MouseEvent.CLICK, onClick);

function onClick(evt:Event):void {
inst_mc.visible = false;
evt.currentTarget.play();
}

/*//SOUND

var isPlaying:Boolean = new Boolean();
var pausePosition:Number = new Number();
var soundClip:Sound = new Sound();
var sndChannel:SoundChannel = new SoundChannel();

soundClip.load(new URLRequest(“av038.wav”));
soundClip.addEventListener(Event.COMPLETE, onComplete, false, 0, true);

controller.addEventListener(MouseEvent.MOUSE_DOWN, btnPressController, false, 0, true);

function onComplete(evt:Event):void {

}

function btnPressController(evt:MouseEvent):void
{
switch(isPlaying)
{
case true:
controller.gotoAndStop(“off”);
pausePosition = sndChannel.position;
sndChannel.stop();
isPlaying = false;
break;
case false:
controller.gotoAndStop(“on”);
sndChannel = soundClip.play(0,int.MAX_VALUE);
isPlaying = true;
break;
}
}*/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s