AS3 Help Needed

7iven8Nine

Shrek's Memelord
OP
Member
Joined
Nov 29, 2014
Messages
139
Trophies
0
Age
24
Location
Here
XP
177
Country
United States
Hey so I just duplicated a object on the stage and gave it a new name but the duplicated object won't move. Any help would be appreciated. Here's the code:

Duplication Code:
if(cheatguard==2){
var dupbig1 = new PeopleBig();
dupbig1.x=300;
dupbig1.y=300;
addChild(dupbig1);
dupbig1.width=75.15;
dupbig1.height=110.35;
}

Movement code:
if(dupbig1 != null){
dupbig1.x += dup1move;
if(dupbig1.hitTestObject(neww)){
neww.x=-215.45;
neww.y=411.2;
updateScoreyellow();
cheatguard=cheatguard+1;
ssd=0;
}
if(dupbig1.hitTestObject(Wallleft)){
dup1move = 5;
}
if(dupbig1.hitTestObject(Wallright)){
dup1move = -5;
}
Edit: dup1move is a variable that equals 5
I get no errors from this code either.
Edit2:Fixed
 
Last edited by 7iven8Nine,
General chit-chat
Help Users
    Veho @ Veho: https://i.imgur.com/E9Gvbpx.jpg