AS3 Help Needed

7iven8Nine

Shrek's Memelord
OP
Member
Joined
Nov 29, 2014
Messages
139
Trophies
0
Age
26
Location
Here
XP
207
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,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • YukiHomura @ YukiHomura:
    My grandpa in turkish: I didnt knew that you can buy food in a
  • YukiHomura @ YukiHomura:
    Buy food and go to toilet same time
  • reha @ reha:
    "aynı anda bir yerden hem yemek alınabileceğini hem de sıçılabileceğini
    bilmiyordum"
  • reha @ reha:
    wise words indeed
  • YukiHomura @ YukiHomura:
    Exactly that
  • reha @ reha:
    anyways... i think i'll just finish the studying as quickly as possible then go the sleep... i have school at 7:45am... (wish me luck) it was nice talking to you ma'am
  • reha @ reha:
    dont mind the grammar mistakes
  • YukiHomura @ YukiHomura:
    Good luck. I go sleep now
  • YukiHomura @ YukiHomura:
    Or in turkish Iyi Geceler
  • BigOnYa @ BigOnYa:
    Game awards on now, live
  • Psionic Roshambo @ Psionic Roshambo:
    Hopefully Mario wins an award best plumber in video games or something
  • BigOnYa @ BigOnYa:
    Wonder won one already
  • GalacticWarsHalloween2023 @ GalacticWarsHalloween2023:
    Ironmouse won content creator??? This is invalid and I won't accept how a VTuber would win TGA (I support Raylife, the company that eliminates vtubers, and I am the founder of the company)
    +1
  • K3N1 @ K3N1:
    Gta 6 already won 12 awards
    +1
  • Sicklyboy @ Sicklyboy:
    Think I'm finally gonna install my hwfly modchip on my Switch OLED soon
  • GalacticWarsHalloween2023 @ GalacticWarsHalloween2023:
    "Ironmouse, you're next! let's see if you can stop you evil kind."
  • Psionic Roshambo @ Psionic Roshambo:
    Hmmm Hyperscan was in the XBox 360/PS3/Wii generation.... I guess the Wii wasn't the weakest lol
  • GalacticWarsHalloween2023 @ GalacticWarsHalloween2023:
    Hyperscan The console that uses cards
    +2
  • BigOnYa @ BigOnYa:
    cant believe that nickolodeon fighter game was nominated for best fighting game of the year. lol
  • K3N1 @ K3N1:
    Bring back arcade carts
  • FlareReZ @ FlareReZ:
    @K3N1, Hopefully lets not get the suicide battery in em.
  • K3N1 @ K3N1:
    I feel asleep to MJs song the girl is mine then I woke up like wait a minute mj how old was she
    +1
  • BigOnYa @ BigOnYa:
    then you woke up to "beat it"
    BigOnYa @ BigOnYa: then you woke up to "beat it"