Could use some help with movement of Movie Clips
package {
import flash.display.MovieClip
import lameGame
import flash.events.MouseEvent
import flash.events.Event
import flash.display.Graphics
public class heroOne extends lameGame {
var kamehamehaGfx:redCircle = new redCircle
var lameCircle:redCircle = new redCircle
var xSlope:Number
var ySlope:Number
public function heroOne() {
var _heroStrength = 20
var _heroSpeed = 2
var _heroHealth = 140
kamehamehaGfx.x = 30
kamehamehaGfx.y = 30
stage.addEventListener(MouseEvent.MOUSE_DOWN, kamehameha);
if(kamehamehaGfx) {
stage.addEventListener(Event.ENTER_FRAME, moveKa);
}
}
public function kamehameha(evt:MouseEvent) {
addChild(kamehamehaGfx)
trace("gay")
var xSlope:Number = 1
var ySlope:Number = ((mouseY - kamehamehaGfx.y)/(mouseX - kamehamehaGfx.x)) ;
}
public function moveKa(evt:Event) {
trace("SuperGay")
kamehamehaGfx.x += xSlope;
kamehamehaGfx.y += ySlope;
trace(kamehamehaGfx.x)
}
}
}
When I click the mouse on the stage, the object spawns but there is no movement
when i trace (kamehamehaGfx.x) I get the value 0 every time
