Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Aug 2021
    Posts
    2
    Member #
    62998

    Javascript Array in Adobe Animate HTML 5 Canvas not working.

    I'm trying to set up a simple array but I keep getting an error trying to access position 0.

    let completeStages=[7, 8, 9];
    if(this.completeStages[0]==7) //Uncaught type error: cannot read property of '0' of undefined
    {
    console.log("print");
    }
    I've also tried var instead of let.
    Tried strings instead of numbers in the array.

    In the end I want strings stored in it and it will be used to check for various strings to show different objects on the screen depending on what is triggered. But I've tried to simplify and look for the error but nothing worked.

    also tried to do an empty array and use .push to get values into it but it didn't like that either. The end quote parentheses and semicolon are there they just aren't showing up when viewing the post. Not sure how to edit it so it shows up.

    Any help would be appreciative.
    Last edited by kodarr; Aug 31st, 2021 at 09:35 AM.

  2.  

  3. #2
    Junior Member
    Join Date
    Aug 2021
    Posts
    2
    Member #
    62998
    Still cannot get arrays working in Animate CC. Tried following some youtube videos but all of them are storing symbols and I can't find any that are just storing values that work. Anyone else know a fix for this?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 06:48 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com