Copy link to clipboard
Copied
I was almost finished creating my first animation in adobe animate using Action Script 3.0 when I ran into a problem coding my buttons. I am trying to create a game that is determined on the decisions the audience makes while watching and interacting with the animation. There are points in the game where the main character stops and there are two buttons that appear so the audience can choose between them to either progress the story along or end it abruptly with a game over and restart button. My first button on frame 1 to start the game goes without any errors or problems, every one after that seem to not work and give me this error message...
Scene 1, Layer 'Actions', Frame 219, Line 17, Column 1 1120: Access of undefined property btn_bub_NO.
I read pretty thoroughly into adobes help center on this issue, something having to do with advanced layers and turning them off, but that is the last thing I want to do because it eliminates my chance of using the camera tool. Please if anyone can help with this it would be very much appreciated.
Copy link to clipboard
Copied
does disabling advanced layers cause your buttons to work correctly?
Copy link to clipboard
Copied
First, thanks for the reply, second, it does but once it is disabled it takes away my camera work which really helps create a sense of direction for the story of my animation.
Copy link to clipboard
Copied
i've seen that in an older animate version (and the solution) was to assign the layer a name (or use the default one) and then use that layer name as the parent of the on stage objects (in that layer).
eg, in layer_1, if you have an instance with name mc_1, on the layer_1 timeline, use:
this.layer_1.mc_1.addEventListener(etc...)
Copy link to clipboard
Copied
I know this is crazy but have you thought of converting your game to HTML5/javascript?
Copy link to clipboard
Copied
Im going to give it a try! Thanks for the reply!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now