Author Topic: Actionscript 2 Help  (Read 1881 times)

0 Members and 1 Guest are viewing this topic.

Offline imo_inx

  • Manman, SaviourOfTheMultiverse!
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 473
  • Rating: +27/-8
  • imo_inx
    • View Profile
Actionscript 2 Help
« on: November 08, 2013, 07:32:30 am »
Ummm… Does anybody here know Actionscript 2.0? I kinda need some help with this code…
The problem is that the bullets lasers won't move. At all. It just pawns and sits there. There are other bugs too, but this is the worst one imo.
Both me and my teacher are stumped as well.

My vars:
Code: [Select]
//Global Vars
gerrycount = 0;
var GeraldMC = Object;
jumppowa = 30;
laserMC = Object;
lnum = 1;
lspeed = 50;
lready = false;
ldelay = 50;
larray = [];
lcount = 1;
look = 100;


Code: [Select]
//LaserCreator
function createlaser(){
var laserMC = this.attachMovie("laser","laser"+lcount,600 + lcount)
if(look = 100){
laserMC._x = GeraldMC._x - 65;
laserMC._y = GeraldMC._y - 50;
}
if(look = -100){
laserMC._x = GeraldMC._x + 5;
laserMC._y = GeraldMC._y - 50;
}
trace(look)
lcount++;
larray.push(laserMC);
}

//LaserBLAST
function laserk(){
if(lready && Key.isDown(Key.UP)){
lready = false;
currentTime = getTimer();
createlaser();
}else{
if(currentTime + ldelay <= getTimer()){
lready = true;
}
}
for (var i = 0; i < larray.length; i++){
if(look = 100){
larray[i]._x -= lspeed;
}
if(look = -100){
larray[i]._x += lspeed;
}
if(larray[i]._x >550){
removeMovieClip(larray[i]);
}
if(larray[i]._x <0){
removeMovieClip(larray[i]);
}