Skip to main content
henryl53269518
Known Participant
January 22, 2018
Answered

An Error #1069 problem that have something to do with camera layerDepthEnabled

  • January 22, 2018
  • 4 replies
  • 2400 views

I have some experience in AS3 few years ago when I was using adobe flash CS6 which contain no built-in camera function.

Now I'm back again with animate CC, and I got this error while trying to make a little game which have some camera tween in the beginning

The error goes like this;

ReferenceError: Error #1069: Property ___layerDepthEnabled___ not found on MyAs3Class and there is no default value.

       at privatePkg::___Camera___/cameraControl()

This error happened when I try to create an AS3 class file that is associate to my main animate file.

And the AS3 file is basically blank and clear.

I have no idea what is happening, the game work just fine, but this keep pops out and I can't read other output text that I want to test, it's annoying.

I am not very familiar with this error code system, I'm also not very good at coding, so maybe my question is stupid, but I try to search on the forum, and didn't find anything similar. It would be great if someone can help me solve this problem, thank you.

This topic has been closed for replies.
Correct answer Robert Mc Dowell

I don't think I'm allowed to release some of the content to public or others on internet. But you've already helped me figure out lots of things, I guess I'll have to do some research on the key words you mentioned, I appreciate that, thank you.

I think I can roundabout this error issue by take out the camera layer for now, and after I finish all the code and debug, attach the camera layer back to the project.

By the way, I've download adobe flash player from official site, but how do I open SWF files with adobe flash player, it seams that it only works for web flash. And I guess this have something to do when I press F12 in Animate CC and nothing happen, but this preview function used to work in CS6. Or how do I reset the default program for F12 preview, this is really inconvenient. If this problem is inappropriate in this section, I'll re-edit this and post it somewhere else.


ok no problem but yes you can search in frames, linked libraries in the preferences, etc...

you certainly will find a bunch of classes and functions linked to the camera

you can read the swf out of the web with the standalone here

Adobe Flash Player - Debug Downloads

4 replies

Colin Holgate
Inspiring
January 22, 2018

I believe you both have some confusion. Robert is talking about the Camera class that has been around for a very long time, which is used to access the device's video camera. Henry is talking about the timeline virtual camera layer in Adobe Animate. If I'm right, it would explain most of the issue. His mention of having used CS6 in the past made it seem like he was using it now.

henryl53269518
Known Participant
January 23, 2018

Yes, I was talking about the virtual camera which you use with hot key C in adobe animate.

And the problem actually cannot be solved by the way I mentioned above, after re-attach the virtual camera layer, the error is not only just cause prompting but also make the virtual camera not functioning at all.

Interesting thing is if I detach MyAs3Class from the main stage, the camera function normal again but then I can't code this project using an independent class.

In the end I choose to use the old stuff, a standalone Virtual Camera "Object" that was a made and coded by other animator years ago, So far this is the simplest solution I can come up with, but it actually work fine just like the old times without having any bug issue.

henryl53269518
Known Participant
January 22, 2018

package  {

import flash.display.*;

import flash.events.*;

import flash.system.fscommand;

import flash.text.TextField;

import flash.text.TextFieldType;

import flash.events.TimerEvent;

import flash.utils.Timer;

import flash.ui.*;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.media.SoundMixer;

import flash.media.SoundTransform;

public class MyAs3Class extends MovieClip{

public static var L_KeyPressed:Boolean = false;

public static var U_KeyPressed:Boolean = false;

public static var I_KeyPressed:Boolean = false;

public static var G_KeyPressed:Boolean = false;

public static var Space_KeyPressed:Boolean = false;

public static var L_KeyHold:Boolean = false;

public static var U_KeyHold:Boolean = false;

public static var I_KeyHold:Boolean = false;

public static var G_KeyHold:Boolean = false;

public static var Space_KeyHold:Boolean = false;

public function MyAs3Class() {

// constructor code

stage.addEventListener(Event.ENTER_FRAME, gameUpdate);

stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);

stage.addEventListener(KeyboardEvent.KEY_UP, onKeyRelease);

}

function gameUpdate(event:Event):void

{

}

function onKeyPress(event:KeyboardEvent):void

{

if (event.keyCode == Keyboard.L)

{

L_KeyPressed = true;

}

if (event.keyCode == Keyboard.U)

{

U_KeyPressed = true;

}

if (event.keyCode == Keyboard.I)

{

I_KeyPressed = true;

}

if (event.keyCode == Keyboard.G)

{

G_KeyPressed = true;

}

if (event.keyCode == Keyboard.SPACE)

{

Space_KeyPressed = true;

}

}

function onKeyRelease(event:KeyboardEvent):void

{

if (event.keyCode == Keyboard.L)

{

L_KeyPressed = false;

}

if (event.keyCode == Keyboard.U)

{

U_KeyPressed = false;

}

if (event.keyCode == Keyboard.I)

{

I_KeyPressed = false;

}

if (event.keyCode == Keyboard.G)

{

G_KeyPressed = false;

}

if (event.keyCode == Keyboard.SPACE)

{

Space_KeyPressed = false;

}

}

function checkKeyHold():void

{

if (L_KeyPressed && !L_KeyHold)

{

L_KeyHold = true;

}

            if (! L_KeyPressed && L_KeyHold)

{

L_KeyHold = false;

}

if (U_KeyPressed && !U_KeyHold)

{

U_KeyHold = true;

}

if (! U_KeyPressed && U_KeyHold)

{

U_KeyHold = false;

}

if (I_KeyPressed && !I_KeyHold)

{

I_KeyHold = true;

}

if (! I_KeyPressed && I_KeyHold)

{

I_KeyHold = false;

}

if (G_KeyPressed && !G_KeyHold)

{

G_KeyHold = true;

}

if (! G_KeyPressed && G_KeyHold)

{

G_KeyHold = false;

}

if (Space_KeyPressed && !Space_KeyHold)

{

Space_KeyHold = true;

}

if (! Space_KeyPressed && Space_KeyHold)

{

Space_KeyHold = false;

}

}

}

}

henryl53269518
Known Participant
January 22, 2018

package  {

import flash.display.*;

import flash.events.*;

import flash.system.fscommand;

import flash.text.TextField;

import flash.text.TextFieldType;

import flash.events.TimerEvent;

import flash.utils.Timer;

import flash.ui.*;

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.media.SoundMixer;

import flash.media.SoundTransform;

public class MyAs3Class extends MovieClip{

//this part have some Boolean variables that have something to do with key control, the problem remain even if I delete these variables

public function MyAs3Class () {

// constructor code

stage.addEventListener(Event.ENTER_FRAME, gameUpdate);

stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);

stage.addEventListener(KeyboardEvent.KEY_UP, onKeyRelease);

}

function gameUpdate(event:Event):void

{

//this part is blank

}

function onKeyPress(event:KeyboardEvent):void

{

//this part have some Boolean variables that have something to do with key control, the problem remain even if I delete these variables

}

function onKeyRelease(event:KeyboardEvent):void

{

//this part have some Boolean variables that have something to do with key control, the problem remain even if I delete these variables

}

}

}

Robert Mc Dowell
Legend
January 22, 2018

Flash Pro CS6 has Camera class, it's one of the AS3 standard class since the creation of AS3

Camera - Adobe ActionScript® 3 (AS3 ) API Reference

then, your error is related to MyAs3Class which is your own class,

layerDepthEnabled is not a Camera class property also.

without to provide any code it's impossible to debug it.

henryl53269518
Known Participant
January 22, 2018

Thank you for your reply, you are fast!

And I didn't know AS3 have that camera stuff.

Here is my code, I will post it.

Robert Mc Dowell
Legend
January 22, 2018

I need the full code to debug it since the code you posted has no relationship with the Camera class