Copy link to clipboard
Copied
Hello, the following code will run when I am using a VCam for a camera. However, if i try bringing in the animate camera, the code breaks and gives me an error. What is causing the issue?
(MovieClip)(parent.getChildByName("minecraft_particles_bottom"))
.addChild(newParticle);
ypeError: Error #1009: Cannot access a property or method of a null object reference.
at movieclipASissue_Scene1_fla::MinecraftPotionParticleCreateArea_4_0_2/createParticle()
at movieclipASissue_Scene1_fla::MinecraftPotionParticleCreateArea_4_0_2/onEnterFrame()
Copy link to clipboard
Copied
This part seems wrong:
(MovieClip)(parent.getChildByName("minecraft_particles_bottom")).addChild(newParticle);
It may need to be this:
MovieClip(parent.getChildByName("minecraft_particles_bottom")).addChild(newParticle());
Copy link to clipboard
Copied
I tried that, bu didn't have any luck, other than continuing to use newParticle.
I really don't understand why the adobe animate camera would cause this code to error out.
Copy link to clipboard
Copied
Is there a way to communicate from one object to the top layer within adobe animate? I basically just want a character who is walking to trigger things at the top level such as foodsteps and dust.