Actionscript Tweening Help(8 errors!)
can any one help me fix my errors?
1136: Incorrect number of arguments. Expected 4. x4
1067: Implicit coercion of a value of type Number to an unrelated type Function. x4
my code:
stop()
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*
// value.valueOf()
var amount:Number = 5
var amount1:Number = 8
var amount2:Number = 12
var amount3:Number = 20
var fireSide:Number
// 1 = Up
// 2 = Right
// 3 = Down
// 4 = Left
var timer:Timer = new Timer(1)
var time:Timer = new Timer(5000)
var miss:Timer = new Timer(5000)
var gotPoint:Timer = new Timer(1, 1)
var value:Number = 1;
var weapon:String;
var txBox:TextField = new TextField;
txBox.width = 128;
txBox.height = 16;
txBox.x = PersonRight.x -txBox.width/2;
txBox.y = PersonRight.y -35;
txBox.border = true;
txBox.borderColor = 0x000000;
txBox.background = true;
txBox.backgroundColor = 0x00FF00;
addChild(txBox);
addEventListener(Event.ENTER_FRAME, checkWeapon)
timer.start()
miss.start()
miss.addEventListener(TimerEvent.TIMER, tooLate)
function tooLate(Event:TimerEvent):void
timer.stop();
miss.stop();
present.visible = false
var presentX:Number = present.x
var presentY:Number = present.y
var minusX:Number
if(presentX >= 226)
minusX = -1
else if(presentX <= 225)
minusX = 1
var minusY:Number
if(presentY >= 200)
minusY = -1
else if(presentY <= 199)
minusY = 1
var ranH:Number = Math.random()*(stage.stageHeight-presentY)* minusY
var ranW:Number = Math.random()*(stage.stageWidth-presentX)* minusX
var changePlaceX:Tween = new Tween(present, "x", null, presentX, ranW, 5, true);
var changePlaceY:Tween = new Tween(present, "y", null, presentY, ranH, 5, true);
changePlaceX.addEventListener(TweenEvent.MOTION_FINISH, restart);
changePlaceY.addEventListener(TweenEvent.MOTION_FINISH, restart);
function restart(Event:TweenEvent):void
timer.start();
present.visible = true
miss.start();
timer.addEventListener(TimerEvent.TIMER, timering)
function timering(Event:TimerEvent):void
if(PersonRight.hitTestObject(present))
gotPoint.addEventListener(TimerEvent.TIMER_COMPLETE, tooLate);
gotPoint.start();
timer.stop()
time.addEventListener(TimerEvent.TIMER, stopAdd);
time.start()
if(value == 1)
amount = amount + 2
if(value == 2)
amount1 = amount1 + 5
if(value == 3)
amount2 = amount2 + 8
if(value == 4)
amount3 = amount3 + 12
if(value == 5)
//do nothing
function stopAdd(Event:TimerEvent):void
timer.stop();
function checkWeapon(event:Event):void
if(value == 1)
weapon = 'Frenzy Plant'
txBox.text = weapon + ' ' + amount.valueOf();
else if(value == 2)
weapon = 'Leaf Storm'
txBox.text = weapon + ' ' + amount1.valueOf();
else if(value == 3)
weapon = 'Solar Beam'
txBox.text = weapon + ' ' + amount2.valueOf();
else if(value == 4)
weapon = 'Giga Drain'
txBox.text = weapon + ' ' + amount3.valueOf();
else if(value == 5)
var neverEnding:String = '∞'
weapon = 'Razor Leaf'
txBox.text = weapon + ' ' + neverEnding;
else
weapon = 'No Weapon'
txBox.text = weapon;
PersonRight.visible = false;
PersonDown.visible = false;
PersonDownStill.visible = false;
PersonUp.visible = false;
PersonUpStill.visible = false;
PersonLeft.visible = false;
PersonLeftStill.visible = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, press);
stage.addEventListener(KeyboardEvent.KEY_UP, release);
function press(event:KeyboardEvent):void
var keyPressed = event.keyCode;
if(keyPressed == 65)
PersonRight.visible = false;
PersonRightStill.visible = false;
PersonDownStill.visible = false;
PersonDown.visible = false;
PersonUp.visible = false;
PersonUpStill.visible = false;
PersonLeft.visible = true;
PersonLeftStill.visible = false;
txBox.x = PersonLeft.x -txBox.width/2;
txBox.y = PersonLeft.y -35;
PersonLeftStill.x = PersonLeft.x;
PersonLeftStill.y = PersonLeft.y;
PersonDownStill.x = PersonLeft.x;
PersonDownStill.y = PersonLeft.y;
PersonDown.x = PersonLeft.x;
PersonDown.y = PersonLeft.y;
PersonRightStill.x = PersonLeft.x
PersonRightStill.y = PersonLeft.y
PersonRight.x = PersonLeft.x
PersonRight.y = PersonLeft.y
PersonUpStill.x = PersonLeft.x
PersonUpStill.y = PersonLeft.y
PersonUp.x = PersonLeft.x
PersonUp.y = PersonLeft.y
PersonLeft.x += -5
checkCollisionWithZombie(wall)
fireSide = 4
if(keyPressed == 87)
PersonRight.visible = false
PersonRightStill.visible = false
PersonDownStill.visible = false
PersonDown.visible = false
PersonUp.visible = true
PersonUpStill.visible = false
PersonLeft.visible = false
PersonLeftStill.visible = false
txBox.x = PersonUp.x -txBox.width/2
txBox.y = PersonUp.y -35
PersonUpStill.x = PersonUp.x
PersonUpStill.y = PersonUp.y
PersonDownStill.x = PersonUp.x
PersonDownStill.y = PersonUp.y
PersonDown.x = PersonUp.x
PersonDown.y = PersonUp.y
PersonRightStill.x = PersonUp.x
PersonRightStill.y = PersonUp.y
PersonRight.x = PersonUp.x
PersonRight.y = PersonUp.y
PersonLeftStill.x = PersonUp.x
PersonLeftStill.y = PersonUp.y
PersonLeft.x = PersonUp.x
PersonLeft.y = PersonUp.y
PersonUp.y += -5
checkCollisionWithZombie(wall)
fireSide = 1
if(keyPressed == 68)
PersonRight.visible = true
PersonRightStill.visible = false
PersonDownStill.visible = false
PersonDown.visible = false
PersonUp.visible = false
PersonUpStill.visible = false
PersonLeft.visible = false
PersonLeftStill.visible = false
txBox.x = PersonRight.x -txBox.width/2
txBox.y = PersonRight.y -35
PersonRightStill.x = PersonRight.x
PersonRightStill.y = PersonRight.y
PersonDownStill.x = PersonRight.x
PersonDownStill.y = PersonRight.y
PersonDown.x = PersonRight.x
PersonDown.y = PersonRight.y
PersonUpStill.x = PersonRight.x
PersonUpStill.y = PersonRight.y
PersonLeftStill.x = PersonRight.x
PersonLeftStill.y = PersonRight.y
PersonLeft.x = PersonRight.x
PersonLeft.y = PersonRight.y
PersonUp.x = PersonRight.x
PersonUp.y = PersonRight.y
PersonRight.x += 5
checkCollisionWithZombie(wall)
fireSide = 2
if(keyPressed == 83)
PersonDown.visible = true
PersonDownStill.visible = false
PersonRight.visible = false
PersonRightStill.visible = false
PersonUp.visible = false
PersonUpStill.visible = false
PersonLeft.visible = false
PersonLeftStill.visible = false
txBox.x = PersonDown.x -txBox.width/2
txBox.y = PersonDown.y -35
PersonDownStill.x = PersonDown.x
PersonDownStill.y = PersonDown.y
PersonRightStill.x = PersonDown.x
PersonRightStill.y = PersonDown.y
PersonRight.x = PersonDown.x
PersonRight.y = PersonDown.y
PersonUpStill.x = PersonDown.x
PersonUpStill.y = PersonDown.y
PersonLeftStill.x = PersonDown.x
PersonLeftStill.y = PersonDown.y
PersonLeft.x = PersonDown.x
PersonLeft.y = PersonDown.y
PersonUp.x = PersonDown.x
PersonUp.y = PersonDown.y
PersonDown.y += 5
checkCollisionWithZombie(wall)
fireSide = 3
if(keyPressed == 81)//16
if(value <= 1)
value = 5
else
value += -1
if(keyPressed == 69)//17
value +=1
if(value == 6)
value = 1
if(keyPressed == Keyboard.SPACE)
if(value == 1)
if(amount == 0)
amount = 0
else
amount+=-1
switch(fireSide)
case 1:
frenzyPlant.rotation -= 90
frenzyPlant.x = PersonUp.x
var attackUp:Tween = new Tween(frenzyPlant, "y", Strong.easeOut(), frenzyPlant.y, -100, 1, true)
break;
case 2:
frenzyPlant.x = PersonRight.x
var attackRight:Tween = new Tween(frenzyPlant, "X", Strong.easeOut(), frenzyPlant.x, 500, 1, true)
break;
case 3:
frenzyPlant.rotation += 90
frenzyPlant.x = PersonDown.x
var attackDown:Tween = new Tween(frenzyPlant, "y", Strong.easeOut(), frenzyPlant.y, 650, 1, true)
break;
case 4:
frenzyPlant.rotation += 180
frenzyPlant.x = PersonLeft.x
var attackLeft:Tween = new Tween(frenzyPlant, "x", Strong.easeOut(), frenzyPlant.x, -100, 1, true)
break;
if(value == 2)
if(amount1 == 0)
amount1 = 0
else
amount1+=-1
if(value == 3)
if(amount2 == 0)
amount2 = 0
else
amount2+=-1
if(value == 4)
if(amount3 == 0)
amount3 = 0
else
amount3+=-1
if(value == 5)
function release(event:KeyboardEvent):void
var keyPressed = event.keyCode;
var thisKey:Number = event.keyCode;
if(keyPressed == 65)
PersonLeft.visible = false
PersonLeftStill.visible = true
PersonLeft.x = PersonLeftStill.x
PersonLeft.y = PersonLeftStill.y
if(keyPressed == 87)
PersonUp.visible = false
PersonUpStill.visible = true
PersonUp.x = PersonUpStill.x
PersonUp.y = PersonUpStill.y
if(keyPressed == 68)
PersonRight.visible = false
PersonRightStill.visible = true
PersonRight.x = PersonRightStill.x
PersonRight.y = PersonRightStill.y
if(keyPressed == 83)
PersonDown.visible = false
PersonDownStill.visible = true
PersonDown.x = PersonDownStill.x
PersonDown.y = PersonDownStill.y
function checkCollisionWithZombie(wall:MovieClip)
Collision.block(PersonDown, wall)
Collision.block(PersonDownStill, wall)
Collision.block(PersonRight, wall)
Collision.block(PersonRightStill, wall)
Collision.block(PersonUp, wall)
Collision.block(PersonUpStill, wall)
Collision.block(PersonLeft, wall)
Collision.block(PersonLeftStill, wall)
Collision.block(PersonDown, wall1)
Collision.block(PersonDownStill, wall1)
Collision.block(PersonRight, wall1)
Collision.block(PersonRightStill, wall1)
Collision.block(PersonUp, wall1)
Collision.block(PersonUpStill, wall1)
Collision.block(PersonLeft, wall1)
Collision.block(PersonLeftStill, wall1)
Collision.block(PersonDown, wall2)
Collision.block(PersonDownStill, wall2)
Collision.block(PersonRight, wall2)
Collision.block(PersonRightStill, wall2)
Collision.block(PersonUp, wall2)
Collision.block(PersonUpStill, wall2)
Collision.block(PersonLeft, wall2)
Collision.block(PersonLeftStill, wall2)
Collision.block(PersonDown, wall3)
Collision.block(PersonDownStill, wall3)
Collision.block(PersonRight, wall3)
Collision.block(PersonRightStill, wall3)
Collision.block(PersonUp, wall3)
Collision.block(PersonUpStill, wall3)
Collision.block(PersonLeft, wall3)
Collision.block(PersonLeftStill, wall3)
Collision.block(PersonDown, wall4)
Collision.block(PersonDownStill, wall4)
Collision.block(PersonRight, wall4)
Collision.block(PersonRightStill, wall4)
Collision.block(PersonUp, wall4)
Collision.block(PersonUpStill, wall4)
Collision.block(PersonLeft, wall4)
Collision.block(PersonLeftStill, wall4)
Collision.block(PersonDown, wall5)
Collision.block(PersonDownStill, wall5)
Collision.block(PersonRight, wall5)
Collision.block(PersonRightStill, wall5)
Collision.block(PersonUp, wall5)
Collision.block(PersonUpStill, wall5)
Collision.block(PersonLeft, wall5)
Collision.block(PersonLeftStill, wall5)
Collision.block(PersonDown, wall6)
Collision.block(PersonDownStill, wall6)
Collision.block(PersonRight, wall6)
Collision.block(PersonRightStill, wall6)
Collision.block(PersonUp, wall6)
Collision.block(PersonUpStill, wall6)
Collision.block(PersonLeft, wall6)
Collision.block(PersonLeftStill, wall6)
Collision.block(PersonDown, wall7)
Collision.block(PersonDownStill, wall7)
Collision.block(PersonRight, wall7)
Collision.block(PersonRightStill, wall7)
Collision.block(PersonUp, wall7)
Collision.block(PersonUpStill, wall7)
Collision.block(PersonLeft, wall7)
Collision.block(PersonLeftStill, wall7)
the lines of codes that are causing the errors(i think)
switch(fireSide)
case 1:
frenzyPlant.rotation -= 90
frenzyPlant.x = PersonUp.x
var attackUp:Tween = new Tween(frenzyPlant, "y", Strong.easeOut(), frenzyPlant.y, -100, 1, true)
break;
case 2:
frenzyPlant.x = PersonRight.x
var attackRight:Tween = new Tween(frenzyPlant, "X", Strong.easeOut(), frenzyPlant.x, 500, 1, true)
break;
case 3:
frenzyPlant.rotation += 90
frenzyPlant.x = PersonDown.x
var attackDown:Tween = new Tween(frenzyPlant, "y", Strong.easeOut(), frenzyPlant.y, 650, 1, true)
break;
case 4:
frenzyPlant.rotation += 180
frenzyPlant.x = PersonLeft.x
var attackLeft:Tween = new Tween(frenzyPlant, "x", Strong.easeOut(), frenzyPlant.x, -100, 1, true)
break;
i'm not really sure how that will help. i checked and everything is working. just i think i coded something wrong
my new code:
stop()
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*
var fAttackUp:Tween;
var fAttackRight:Tween;
var fAttackDown:Tween;
var fAttackLeft:Tween;
// value.valueOf()
var amount:Number = 5
var amount1:Number = 8
var amount2:Number = 12
var amount3:Number = 20
var fireSide:Number
// 1 = Up
// 2 = Right
// 3 = Down
// 4 = Left
var timer:Timer = new Timer(1)
var time:Timer = new Timer(5000)
var miss:Timer = new Timer(5000)
var gotPoint:Timer = new Timer(1, 1)
var value:Number = 1;
var weapon:String;
var txBox:TextField = new TextField;
txBox.width = 128;
txBox.height = 16;
txBox.x = PersonRight.x -txBox.width/2;
txBox.y = PersonRight.y -35;
txBox.border = true;
txBox.borderColor = 0x000000;
txBox.background = true;
txBox.backgroundColor = 0x00FF00;
addChild(txBox);
addEventListener(Event.ENTER_FRAME, checkWeapon)
timer.start()
miss.start()
miss.addEventListener(TimerEvent.TIMER, tooLate)
function tooLate(Event:TimerEvent):void
timer.stop();
miss.stop();
present.visible = false
var presentX:Number = present.x
var presentY:Number = present.y
var minusX:Number
if(presentX >= 226)
minusX = -1
else if(presentX <= 225)
minusX = 1
var minusY:Number
if(presentY >= 200)
minusY = -1
else if(presentY <= 199)
minusY = 1
var ranH:Number = Math.random()*(stage.stageHeight-presentY)* minusY
var ranW:Number = Math.random()*(stage.stageWidth-presentX)* minusX
var changePlaceX:Tween = new Tween(present, "x", null, presentX, ranW, 5, true);
var changePlaceY:Tween = new Tween(present, "y", null, presentY, ranH, 5, true);
changePlaceX.addEventListener(TweenEvent.MOTION_FINISH, restart);
changePlaceY.addEventListener(TweenEvent.MOTION_FINISH, restart);
function restart(Event:TweenEvent):void
timer.start();
present.visible = true
miss.start();
time.start();
timer.addEventListener(TimerEvent.TIMER, timering)
function timering(Event:TimerEvent):void
if(PersonRight.hitTestObject(present))
gotPoint.addEventListener(TimerEvent.TIMER_COMPLETE, tooLate);
gotPoint.start();
timer.stop()
time.addEventListener(TimerEvent.TIMER, stopAdd);
time.start()
if(value == 1)
amount = amount + 2
if(value == 2)
amount1 = amount1 + 5
if(value == 3)
amount2 = amount2 + 8
if(value == 4)
amount3 = amount3 + 12
if(value == 5)
//do nothing
function stopAdd(Event:TimerEvent):void
timer.stop();
function checkWeapon(event:Event):void
if(value == 1)
weapon = 'Frenzy Plant'
txBox.text = weapon + ' ' + amount.valueOf();
else if(value == 2)
weapon = 'Leaf Storm'
txBox.text = weapon + ' ' + amount1.valueOf();
else if(value == 3)
weapon = 'Solar Beam'
txBox.text = weapon + ' ' + amount2.valueOf();
else if(value == 4)
weapon = 'Giga Drain'
txBox.text = weapon + ' ' + amount3.valueOf();
else if(value == 5)
var neverEnding:String = '∞'
weapon = 'Razor Leaf'
txBox.text = weapon + ' ' + neverEnding;
else
weapon = 'No Weapon'
txBox.text = weapon;
PersonRight.visible = false;
PersonDown.visible = false;
PersonDownStill.visible = false;
PersonUp.visible = false;
PersonUpStill.visible = false;
PersonLeft.visible = false;
PersonLeftStill.visible = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, press);
stage.addEventListener(KeyboardEvent.KEY_UP, release);
function press(event:KeyboardEvent):void
var keyPressed = event.keyCode;
if(keyPressed == Keyboard.LEFT) // 65
PersonRight.visible = false;
PersonRightStill.visible = false;
PersonDownStill.visible = false;
PersonDown.visible = false;
PersonUp.visible = false;
PersonUpStill.visible = false;
PersonLeft.visible = true;
PersonLeftStill.visible = false;
txBox.x = PersonLeft.x -txBox.width/2;
txBox.y = PersonLeft.y -35;
PersonLeftStill.x = PersonLeft.x;
PersonLeftStill.y = PersonLeft.y;
PersonDownStill.x = PersonLeft.x;
PersonDownStill.y = PersonLeft.y;
PersonDown.x = PersonLeft.x;
PersonDown.y = PersonLeft.y;
PersonRightStill.x = PersonLeft.x
PersonRightStill.y = PersonLeft.y
PersonRight.x = PersonLeft.x
PersonRight.y = PersonLeft.y
PersonUpStill.x = PersonLeft.x
PersonUpStill.y = PersonLeft.y
PersonUp.x = PersonLeft.x
PersonUp.y = PersonLeft.y
PersonLeft.x += -5
checkCollisionWithZombie(wall)
fireSide = 4
if(keyPressed == Keyboard.UP)//87
PersonRight.visible = false
PersonRightStill.visible = false
PersonDownStill.visible = false
PersonDown.visible = false
PersonUp.visible = true
PersonUpStill.visible = false
PersonLeft.visible = false
PersonLeftStill.visible = false
txBox.x = PersonUp.x -txBox.width/2
txBox.y = PersonUp.y -35
PersonUpStill.x = PersonUp.x
PersonUpStill.y = PersonUp.y
PersonDownStill.x = PersonUp.x
PersonDownStill.y = PersonUp.y
PersonDown.x = PersonUp.x
PersonDown.y = PersonUp.y
PersonRightStill.x = PersonUp.x
PersonRightStill.y = PersonUp.y
PersonRight.x = PersonUp.x
PersonRight.y = PersonUp.y
PersonLeftStill.x = PersonUp.x
PersonLeftStill.y = PersonUp.y
PersonLeft.x = PersonUp.x
PersonLeft.y = PersonUp.y
PersonUp.y += -5
checkCollisionWithZombie(wall)
fireSide = 1
if(keyPressed == Keyboard.RIGHT)//68
PersonRight.visible = true
PersonRightStill.visible = false
PersonDownStill.visible = false
PersonDown.visible = false
PersonUp.visible = false
PersonUpStill.visible = false
PersonLeft.visible = false
PersonLeftStill.visible = false
txBox.x = PersonRight.x -txBox.width/2
txBox.y = PersonRight.y -35
PersonRightStill.x = PersonRight.x
PersonRightStill.y = PersonRight.y
PersonDownStill.x = PersonRight.x
PersonDownStill.y = PersonRight.y
PersonDown.x = PersonRight.x
PersonDown.y = PersonRight.y
PersonUpStill.x = PersonRight.x
PersonUpStill.y = PersonRight.y
PersonLeftStill.x = PersonRight.x
PersonLeftStill.y = PersonRight.y
PersonLeft.x = PersonRight.x
PersonLeft.y = PersonRight.y
PersonUp.x = PersonRight.x
PersonUp.y = PersonRight.y
PersonRight.x += 5
checkCollisionWithZombie(wall)
fireSide = 2
if(keyPressed == Keyboard.DOWN)//83
PersonDown.visible = true
PersonDownStill.visible = false
PersonRight.visible = false
PersonRightStill.visible = false
PersonUp.visible = false
PersonUpStill.visible = false
PersonLeft.visible = false
PersonLeftStill.visible = false
txBox.x = PersonDown.x -txBox.width/2
txBox.y = PersonDown.y -35
PersonDownStill.x = PersonDown.x
PersonDownStill.y = PersonDown.y
PersonRightStill.x = PersonDown.x
PersonRightStill.y = PersonDown.y
PersonRight.x = PersonDown.x
PersonRight.y = PersonDown.y
PersonUpStill.x = PersonDown.x
PersonUpStill.y = PersonDown.y
PersonLeftStill.x = PersonDown.x
PersonLeftStill.y = PersonDown.y
PersonLeft.x = PersonDown.x
PersonLeft.y = PersonDown.y
PersonUp.x = PersonDown.x
PersonUp.y = PersonDown.y
PersonDown.y += 5
checkCollisionWithZombie(wall)
fireSide = 3
if(keyPressed == 81)//16
if(value <= 1)
value = 5
else
value += -1
if(keyPressed == 69)//17
value +=1
if(value == 6)
value = 1
if(keyPressed == Keyboard.SPACE)
trace(fireSide)
if(value == 1)
if(amount == 0)
amount = 0
else
amount+=-1
switch(fireSide)
case 1:
frenzyPlant.x = PersonUp.x
frenzyPlant.rotation = 270
trace(frenzyPlant.x)
fAttackUp= new Tween(frenzyPlant, "y", Strong.easeOut, PersonUp.y, -100, 1, true)
frenzyPlant.x = PersonRight.x
trace("did")
break;
case 2:
frenzyPlant.x = PersonRight.x
trace(frenzyPlant.x)
fAttackRight = new Tween(frenzyPlant, "x", Strong.easeOut, PersonRight.x, 650, 1, true)
frenzyPlant.x = PersonRight.x
trace("did")
break;
case 3:
frenzyPlant.x = PersonDown.x
frenzyPlant.rotation = 90
trace(frenzyPlant.x)
fAttackDown = new Tween(frenzyPlant, "y", Strong.easeOut, PersonDown.y, 500, 1, true)
frenzyPlant.x = PersonLeft.x
trace("did")
break;
case 4:
frenzyPlant.x = PersonLeft.x
frenzyPlant.rotation = 180
trace(frenzyPlant.x)
fAttackLeft = new Tween(frenzyPlant, "x", Strong.easeOut, PersonLeft.x, -100, 1, true)
frenzyPlant.x = PersonLeft.x
trace("did")
break;
if(value == 2)
if(amount1 == 0)
amount1 = 0
else
amount1+=-1
if(value == 3)
if(amount2 == 0)
amount2 = 0
else
amount2+=-1
if(value == 4)
if(amount3 == 0)
amount3 = 0
else
amount3+=-1
if(value == 5)
function release(event:KeyboardEvent):void
var keyPressed = event.keyCode;
var thisKey:Number = event.keyCode;
if(keyPressed == 65)
PersonLeft.visible = false
PersonLeftStill.visible = true
PersonLeft.x = PersonLeftStill.x
PersonLeft.y = PersonLeftStill.y
if(keyPressed == 87)
PersonUp.visible = false
PersonUpStill.visible = true
PersonUp.x = PersonUpStill.x
PersonUp.y = PersonUpStill.y
if(keyPressed == 68)
PersonRight.visible = false
PersonRightStill.visible = true
PersonRight.x = PersonRightStill.x
PersonRight.y = PersonRightStill.y
if(keyPressed == 83)
PersonDown.visible = false
PersonDownStill.visible = true
PersonDown.x = PersonDownStill.x
PersonDown.y = PersonDownStill.y
function checkCollisionWithZombie(wall:MovieClip)
Collision.block(PersonDown, wall)
Collision.block(PersonDownStill, wall)
Collision.block(PersonRight, wall)
Collision.block(PersonRightStill, wall)
Collision.block(PersonUp, wall)
Collision.block(PersonUpStill, wall)
Collision.block(PersonLeft, wall)
Collision.block(PersonLeftStill, wall)
Collision.block(PersonDown, wall1)
Collision.block(PersonDownStill, wall1)
Collision.block(PersonRight, wall1)
Collision.block(PersonRightStill, wall1)
Collision.block(PersonUp, wall1)
Collision.block(PersonUpStill, wall1)
Collision.block(PersonLeft, wall1)
Collision.block(PersonLeftStill, wall1)
Collision.block(PersonDown, wall2)
Collision.block(PersonDownStill, wall2)
Collision.block(PersonRight, wall2)
Collision.block(PersonRightStill, wall2)
Collision.block(PersonUp, wall2)
Collision.block(PersonUpStill, wall2)
Collision.block(PersonLeft, wall2)
Collision.block(PersonLeftStill, wall2)
Collision.block(PersonDown, wall3)
Collision.block(PersonDownStill, wall3)
Collision.block(PersonRight, wall3)
Collision.block(PersonRightStill, wall3)
Collision.block(PersonUp, wall3)
Collision.block(PersonUpStill, wall3)
Collision.block(PersonLeft, wall3)
Collision.block(PersonLeftStill, wall3)
Collision.block(PersonDown, wall4)
Collision.block(PersonDownStill, wall4)
Collision.block(PersonRight, wall4)
Collision.block(PersonRightStill, wall4)
Collision.block(PersonUp, wall4)
Collision.block(PersonUpStill, wall4)
Collision.block(PersonLeft, wall4)
Collision.block(PersonLeftStill, wall4)
Collision.block(PersonDown, wall5)
Collision.block(PersonDownStill, wall5)
Collision.block(PersonRight, wall5)
Collision.block(PersonRightStill, wall5)
Collision.block(PersonUp, wall5)
Collision.block(PersonUpStill, wall5)
Collision.block(PersonLeft, wall5)
Collision.block(PersonLeftStill, wall5)
Collision.block(PersonDown, wall6)
Collision.block(PersonDownStill, wall6)
Collision.block(PersonRight, wall6)
Collision.block(PersonRightStill, wall6)
Collision.block(PersonUp, wall6)
Collision.block(PersonUpStill, wall6)
Collision.block(PersonLeft, wall6)
Collision.block(PersonLeftStill, wall6)
Collision.block(PersonDown, wall7)
Collision.block(PersonDownStill, wall7)
Collision.block(PersonRight, wall7)
Collision.block(PersonRightStill, wall7)
Collision.block(PersonUp, wall7)
Collision.block(PersonUpStill, wall7)
Collision.block(PersonLeft, wall7)
Collision.block(PersonLeftStill, wall7)
Similar Messages
-
Hi - Still new to flash as3 and php -
it is a contact form page - user puts in information - i am to receive it in an email address their information
as well the variables get sent back from the php to the .swf file.
I am receiving these errors and not knowing how to fix them.
any help would be much appreciated. thank you in advance really.
below are the errors in flash - as3 code - and php code setup.
errors:
ActionScript 3 + PHP: TypeError: Error #2007: Parameter text must be non-null:
at flash.text::TextField/set text()
at kwangjaekim_fla::wholeform_16/completeHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
my as3 code is the following:
// build variable name for the URL Variables loader
var variables:URLVariables = new URLVariables();
//Build the varSend variable
var varSend:URLRequest = new URLRequest("contact_parse.php");
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
//Build the varLoader variable
var varLoader:URLLoader = new URLLoader;
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader.addEventListener(Event.COMPLETE, completeHandler);
//handler for the PHP script completion and return of status
function completeHandler(event:Event):void{
//value is cleared at ""
name_txt.text = "";
contact_txt.text = "";
msg_txt.text = "";
//Load the response PHP here
status_txt.text = event.target.data.return_msg;
//Add event listener for submit button click
submit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);
//function ValidateAndSend
function ValidateAndSend(event:MouseEvent):void{
//validate fields
if(!name_txt.length){
status_txt.text = "Please Enter Your Name";
}else if(!contact_txt.length){
status_txt.text = "Please Enter Your Contact Detail";
}else if(!msg_txt.length){
status_txt.text = "Please Enter Your Message";
}else {
// ready the variables in form for sending
variables.userName = name_txt.text;
variables.userContact = contact_txt.text;
variables.userMsg = msg_txt.text;
// Send the data to PHP now
varLoader.load(varSend);
submit_btn.addEventListener(MouseEvent.CLICK, function(){MovieClip(parent).gotoAndPlay(151)});
} // Close else condition for error handling
} // Close validate and send function
my php code is the following:
<?php
// Create local PHP variables from the info the user gave in the Flash form
$senderName = $_POST['userName'];
$senderEmail = $_POST['userContact'];
$senderMessage = $_POST['userMsg'];
// Strip slashes on the Local variables
$senderName = stripslashes($senderName);
$senderContact = stripslashes($senderContact);
$senderMessage = stripslashes($senderMessage);
//!!!!!!!!!!!!!!!!!!!!!!!!! change this to my email address !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$to = "put iny me email address";
// Place sender Email address here
$from = "$senderContact ";
$subject = "Contact from your site";
//Begin HTML Email Message
$message = <<<EOF
<html>
<body bgcolor="#FFFFFF">
<b>Name</b> = $senderName<br /><br />
<b>Contact</b> = <a href="mailto:$senderContact">$senderEmail</a><br /><br />
<b>Message</b> = $senderMessage<br />
</body>
</html>
EOF;
//end of message
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$to = "$to";
mail($to, $subject, $message, $headers);
exit();
?>
thank you once again
jaythank you Ned -
i put in the trace line as you mentioned -
and this is what i received -
returns: undefined
TypeError: Error #2007: Parameter text must be non-null
at flash.text::TextField/set text()
at kwangjaekim_fla::wholeform_16/completeHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
what does this mean exactly?
thank you for the help really -
Actionscript 2 help needed on rotating movieclip
I need help with the "stopping" of a movieclip rotation. I think this would be easy for you Flash gurus but impossible for me.
Here is the description. The code below shows a movieclip rotating after mouse click but i want it to stop in place after 60 degrees. Basically I need it to rotate 60 degrees after every mouse click and stop. The "trace" function is there so i know something will happen when it rotates a certain degree. Right now it rotates continually after the mouse click.
mc.onRelease=function(){
mc.onEnterFrame=function(){
mc._rotation=mc._rotation+=10;
if(mc._rotation==60){
trace("HIT");
As a bonus i would like the rotation of every 60 degrees to ease in and out. Thank you in advance for any help you can give me.When the _rotation value reaches the 60 degree mark, you need to delete the onEnterFrame delete mc.onEnterFrame;.
There is only one position where the _rotation value will == 60, so if the intention is to stop it at every 60 degrees, then you'll need to change the conditional to be...
if(mc._rotation%60==0){
So....
mc.onRelease = function(){
mc.onEnterFrame = function(){
mc._rotation = mc._rotation+=10;
if(mc._rotation%60==0){
trace(mc._rotation);
delete mc.onEnterFrame;
If you want to have easing, I suggest looking into using Actionscript tweening. With steps of 10 there's little room to ease. -
help with error 16820 with trying to update acrobat
Please refer to following links, might be helpful.
http://answers.acrobatusers.com/While-updating-acrobat-error-code-showd-16820-solve-q7115. aspx
http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/acrobat-co m-will-not-update-getting-error-16820/7bbbef64-df3e-4fbd-b552-fc1c7a5983c3?msgId=dcf838d8- a198-4a3a-b034-94a07c2e8648
If this doesn't work, we need more information here. -
RoboHelp Server 7 Help System Errors
Whenever I publish my RH 7 Help project to server, I check
the RoboHelp Server Web Administrator for errors. I always get Help
System Error "Requested file cannot be found" for a file called
bsscfp.txt. To my knowledge, this is a control file generated
during the publishing process. If this is the case why is an error
being generated for a file I have no control over? Also, I find the
Troubleshooting section of RoboHelp Server Web Administrator to be
rather useless in correcting issues. Is there any reference
documentation that explains some of the cryptic error messages that
appear in the Server Web Administrator screen?Hi, ouque and welcome to the forum.
Just to clarify your setup. When you say "Project pane" are
you referring to the Configuration Manager on the server itself.
Or, are you referring to something you are seeing from the RoboHelp
authoring client app's Server Administration pane?
If you have access to the actual server desktop and view the
Configuration Manager, sometimes on a new installation, you can do
a "refresh" and the project will show up.
A few more questions:
Have you tried accessing the website and does the project
come up in the web browser?
On what kind of web server did you install RHS7? Windows
2003, etc.?
Is Microsoft Indexing Services turned on?
Apparently you were able to successfully publish your project
to the server so there is "communication" between your desktop and
the server I gather.
A few more details and we'll try to help.
Thanx,
john -
Search help: Internal Error.
Hi,
I am getting information message : 'Search help: Internal Error' after incorporating code in RETURN event. My aim was to populate the value from Hit list to Value with restriction field and then by removing some search select criteria, again display the hit list. It is coming back to the value with restriction field screen also populating the fields properly, below 1 information message is coming 'Search help: Internal Error'. If I remove some field from selection and again press the go button, it is doing nothing and system is hanging. The details are given below.
I have created one search help ZTMVGR1 having the following details:
Search help type : Elementary.
Selection Method : MVKE
Search help exit: ZF4_MATGRP_EXIT1.
Display value with restrictions : A
Field Import EXPORT LPOS SPOS SDis Data Element
MATNR X X 5 5 MATNR
VKORG X X 1 1 VKORG
VTWEG X X 2 2 VTWEG
MVGR1 X X 3 3 MVGR1
KONDM X X 4 4 KONDM
MAKTX X X 6 0 MAKTX
In the search help exit ZF4_MATGRP_EXIT1 I have used three events:
1) PRESEL : Purpose of using this was I was not able to see F4 help for few fields in value with restriction screen . I found out that in SHLP-INTERFACE-F4FIELD is equal to 'X', sometimes in search help if that field's value is 'X' , F4 help does not come even if check table exists for that field.
2) DISP : Purpose, I want to fetch material description field in exit only. MAKTX does not exist in MVKE, so either I need to create a view containing all my fields, or populate the one which is not there in selection method in exit.
3) Return : Purpose, I want to put VKORG, VTWEG and MATNR ( MATNR has collective search help, based on material description , we can put material ) . The hit list we get contains VKORG, VTWEG, MATNR, KONDM, MVGR1 and MAKTX. When we double click on hitlist the value returns , I want to populate these entries in value with restriction field. So KONDM and MVGR1 field will be populated. Now I will remove the value of material-low from selection screen and find out for VKORG, VTWEG and MVGR1/KONDM what materials are there. But after writing the code for event RETURN I am getting information message 'Search Help: Internal Error'.
My code snippet is given below.
<removed by moderator>
Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve formatting.
Edited by: Thomas Zloch on May 13, 2011 1:35 PMHI,
In search help exit you need to use the below mentioned function modules
'F4UT_PARAMETER_ALLOCATE' For allocating fields
'F4UT_PARAMETER_VALUE_GET' Get Value
'F4UT_PARAMETER_RESULTS_PUT' put Value
In the same order.
Thanks & regards,
Bhargav. -
Please Help - "page error" / a system error occurred
I am very basic with Coldfusion Developed websites and pretty awesome on HTML and PHP. While working on a website I made an HTML change and added a line to a page. All works well on the test website/server but after uploading the changed page the page went offline/errored a day later.
I have an error receipt and am hoping to resolve this issue with some insight from a good Coldfusion Developer or Programmer.
PLEASE HELP, see error below.
A system error occurred: http://www.mix.co.zm/mix_schools.cfm?
Error - struct
Detail Note: If you wish to use an absolute template path (for example, template="/mypath/index.cfm") with CFINCLUDE, you must create a mapping for the path using the ColdFusion Administrator. Or, you can use per-application settings to specify mappings specific to this application by specifying a mappings struct to THIS.mappings in Application.cfc. <br> Using relative paths (for example, template="index.cfm" or template="../index.cfm") does not require the creation of any special mappings. It is therefore recommended that you use relative paths with CFINCLUDE whenever possible.
Message Could not find the included template components/mix_documents2.cfm.
MissingFileName components/mix_documents2.cfm
StackTrace coldfusion.tagext.lang.IncludeTag$NoSuchIncludeTemplateException: Could not find the included template components/mix_documents2.cfm. at coldfusion.tagext.lang.IncludeTag.setTemplate(IncludeTag.java:349) at cfmix_schools2ecfm527774291.runPage(D:\hshome\mixnet\mix.co.zm\mix_schools.cfm:15) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:360) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at com.intergral.fusionreactor.filter.FusionReactorFilter.i(FusionReactorFilter.java:566) at com.intergral.fusionreactor.filter.FusionReactorFilter.c(FusionReactorFilter.java:258) at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java: 164) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 ) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
TagContext Error - array
1 Error - struct
COLUMN 0
ID CFINCLUDE
LINE 15
RAW_TRACE at cfmix_schools2ecfm527774291.runPage(D:\hshome\mixnet\mix.co.zm\mix_schools.cfm:15)
TEMPLATE D:\hshome\mixnet\mix.co.zm\mix_schools.cfm
TYPE CFML
TagName CFINCLUDE
Type MissingIncludeWith LR closed move the preferences file to the Trash as described at the below link. You will lose your Preferences settings, so you may want to record them if unsure what you have changed from the default settings.
http://helpx.adobe.com/lightroom/kb/error-changing-modules-lightroom
DO NOT RESTART LR!
Next uninstall LR and then completely shutdown your system and turn the power OFF. Your catlog(s) will not be removed, so no worries.
Restart your system and reinstall LR using the latest version download available (LR5.4, LR4.4).
What version of LR and OS X are you using? -
My macbook pro intel core duo 2 keeps restarting intermittenly. Help with error code.
I have run a Hardware Test, and it gives the follwing error code. Can anyone tell me what this is? I recently had my logic board replaced within the last 3 months, so it shouldn't be a problem there.
Thank you very much for any and all help.
Error code:
4SNS/I/40000000:TGOH-128.00Online references possible memory issue? Sensors?
https://discussions.apple.com/thread/3140607?start=0&tstart=0
Keep taking it back and they keep switching parts until the problem is gone. -
Need help with error message 213:8
Need help with error message 213:8, this error message prompted after re-installing CS5.5 on the same machine (W7 Pro)
Thanks.Hi TKA_,
Please try the solutions mentioned on following forum thread.
http://support.muse.adobe.com/thread/1305941?start=0&tstart=0
Let me know if it works?
Regards,
Sumit Singh -
How to explicitely write PLSQL code for "Help - Display Error"? [SOLVED]
I'm using menu DEFAULT&SMARTBAR and I'd like to write command in PLSQL code for "Help - Display Error" to display error. Has anyone any idea how to do this? I can not find syntaks in form help for this.
Message was edited by:
marussigDisplay_Error;
-
HELP PLEASE - ERROR ON PANSONIC P50VT20B AND Panso...
HELP PLEASE - ERROR ON PANSONIC P50VT20B AND Panasonic HOME CINEMA SC-BTT775.
the moment i login using the tv or blu-ray i cannot choose anything other than ' Back to homepage ' message which is displayed under my contactlist on tv... at times it says too many contacts... Kindly help... the camera is skyoe ty-cc10w for panasonic tv's and blu-ray...Same issue
-
hello apple.help me network iphone 4 use ios7.12 error network.acoount icloud.apple please help support errors no service network.thank you
<Personal Information Edited by Host>tran ngoc nhan,
Viết bằng tiếng mẹ đẻ của bạn?
Tôi đoán Việt Nam?
Chúng tôi có thể dịch!
Nói cho tất cả vấn đề của bạn!
Cung cấp cho nhiều chi tiết!
Nếu không Việt Nam, dịch này ở đây!
https://translate.google.com/
Write in your native language?
I guess Vietnamese?
We can translate!
Tell all your problem!
Give much detail!
If not Vietnamese, translate this here!
https://translate.google.com/
CCC -
Adobe Help Center Error Message. It claims I don't have the right product installed. PSE 5 IS installed and it works OK - just not the help system.
I've no idea on the cause of this problem. Perhaps you might want to try using system restore within accessories->system tools and restore to the date before you installed the webcam cd.
(Warning! - be extremely careful of this step. Use at YOUR OWN RISK!)
1. Disconnect from the internet, turn off your firewall and antivirus software.
2. Install the latest version of the Webcam Center .7.02 and reboot.
3. Turn on yout firewall and antivirus software and install the webcam driver.
4. Enable internet connection. -
I created random quiz with 20 questions and tested it at www.scorm.com for scorm compliance testing. When I launch the course, i get the below error message. If I select continue and proceed to the quiz, after answering few question, randomly submit button for one of the questions is getting disabled. Please help.
ERROR MESSAGE:
ReferenceError: Error #1056: Cannot create property btnEnterJ on mmquizzingv4_as3.mmquizclasses.SubmitButton.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at captivate.veela_as3::rdBase()
at captivate.veela_as3::rdItem()
at mmquizzingv4_as3.mmquizclasses::QuestionButton()
at mmquizzingv4_as3.mmquizclasses::SubmitButton()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at mmquizzingv4_as3.mmquizclasses::Question()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at captivate.veela_as3::rdBase()
at captivate.veela_as3::rdSlide()
at captivate.veela_as3::rdQPSlide()I got the code when I up graded to Adobe air and it has a conflect with accure weather..... Looks like someone attached it to the upgrade to Adobe 8
Enter the code in the Adobe support search web page and you get another erro code not in English....hummmm Google comes up on the support button
to reg the google internet browers I did and google came up and I type in the adobe 1056 error...Over 5 third party free fixes came up???? Windows 7
didn't like anyone of them.......I called Adobe support and no help for free......I uninstalled the Adobe Air and the error went away along with adobe Air...
It seems everyone else knows there is a problem but Adobe???? I love Adobe.....I don't like there lack of Training their customer support people.... -
Help pls,error 21 when i'm try'ng to do restore at iphone 3g
help pls,error 21 when i'm try'ng to do restore at iphone 3g
Try this, copied from http://support.apple.com/kb/TS2802
Display shows a white screen
Try turning iPhone off and then on again.
If the iPhone will not turn off, try to reset it. Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until either the Apple logo or battery symbol appears. If the battery symbol appears, continue to charge iPhone until it is fully charged.
If that doesn't work, try restoring the device.
Maybe you are looking for
-
ASA newb here. This question has been asked before but the configurations seem to be different so they don't really answer my question. I think mine is pretty simple but I can't find a clear "this is what you do" answer. I've been reading the Cisc
-
How do I change the name associated with my @icloud email
Whenever I send an email the message sends with my wife's name....how can I change this? The account is in my name and Icloud displays my name.
-
BT OpenZone in Hotels (Roaming Partners)
Hello, Just rang BT Openzone department to find out i can not use my login credentials for BT Openzone with BT's Roaming partners, e.g. wifi in hotels. I was under the impression that if i sign up for FON, i can use all BT Openzone networks. I totall
-
Unable to send or receive email
We purchased an iPad with Retina display in Nov 2012, since we bought it, we have had issues with email. We are now unable to send or receive email from Microsoft Exchange server on the ipad. The email locks up when trying to open or send. It has got
-
How to call a Include type Report Program in Executable Program. ?
Hi experts, I have created a Include type report program and I want to run this include program in other report program. Which abap statement should i use ? Thanks Saurabh