Can someone explain to me please this logic?

table = [1,2,3,4,5,6,7];

newArray = array;
trace ("array:" + table);

newArray = newArray.splice (0, 5);
trace ("array:" + table);

Output:

Table: 1,2,3,4,5,6,7
Table: 6.7

As you can see, I put a variable equal to the other (newArray = array), then he splice. But the problem is, it affects the old variable too!

How can this be?

I need to use the full original 'picture', but little matter how many variables, I create equal, when I Splice, it affects all the!

I could find a solution by turning the variable string, and then back to the table or something like that. But what I would like is to understand what is happening in this code. If someone could explain to me, I would appreciate it a lot.

because they both point to the same object.  (if you do not understand how pointers, search using google until I understand).

to copy a table, edit copy and have NOT hit edit original, use slice():

var may: Array = oldA.slice ();

now, any changes made to the may leave unchanged oldA.

Tags: Adobe Animate

Similar Questions

  • New to photoshop, you want some advice on creating a design template, can someone explain how to do this

    Heya,

    So hopefully back in photoshop, my knowledge in this moment is minimal pritty, but I'm going to start learning to use it again.

    I am new to this forum and have the intention to come here often to get advice, but I hope that someone would be kind enough to point me in the direction I'm looking for, I would be very grateful.

    First of all, I haven't decided what product of adobe photoshop is best suited for what I'm looking for and I aim to explore the first tests to find out.
    I'm looking to create drawings with a software that there is really no limit in terms of creating templates.
    I was wondering if someone could give me some links to a tutorial or something that explains how to create the stencil effect in the image which is regarded as a tree with a cityscape in the background and possibly other effects observed on the t-shirt. I know it maybe a lot, but that would mean very much if someone could explain how to create effects like that.
    Here is the image:http://www.gifts.com/products/Kohls/Mudd-Tree-Tee?p=6886:1945256129:35
    I know that the image is small, it was the best I could find, I hope you can still see pretty well.
    Thanks in advance
    I really appreciate it!


    http://cache.gifts.com/photos/opd/R/M/Z/4/RMZ4Z5AAJKFVHU8J3QUK.jpg?01AD=3RMIhUK41BUaLn743B66iFuAzMY8KJEDX26S2Y-AcV4OcNu_lge9qWw&01RI=917DCB5E055D2B1&01NA=na

    Firstly you can google"photoshop tutorial distresssed".»

    With respect to the combination of images like that a combination of If-parameters of mixture (we can divide the handles by alt-click-drag their)), groups of layers with Blend Modes other than to pass through and Grtadient cards can be used to maintain the editability of the top.

    We could also just use the images that layer to the layers of solid color masks (and use levels or curves to get the intended contrast), though.

  • I changed my phone number, but I can't update the 'ACCESSIBLE AT' number on my Apple ID account Please can someone explain how I can change the number of 'ACCESSIBLE AT', to update my account with my new number?   Thank you.

    I changed my phone number, but I can't update the 'ACCESSIBLE AT' number on my Apple ID account Please can someone explain how I can change the number of 'ACCESSIBLE AT', to update my account with my new number?

    Thank you.

    Try going into settings > FaceTime and turn off FaceTime. Then go to Messages and turn off iMessage.

    Turn off your phone and then new.

    RETURN to FaceTime and turn it on again, even with iMessage. He has to try to reactivate and your new number should appear (you can see this more down in the addresses to send & receive). You may need to log into your Apple ID for this operation.

  • I just install an update of Adobe Reader and find now that I've lost all screen savers. Please can someone explain how I can get them all back!

    I just install an update of Adobe Reader and find now that I've lost all screen savers. Please can someone explain how I can get them all back!

    Hello

    try a restore of the system before this happened

    http://www.windowsvistauserguide.com/system_restore.htm

    If necessary do in safe mode

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode option with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.
  • I try to install FontAwesomePS_1.0.0 for Photoshop CC15. This extension cannot be mounted, it requires the version of photoshop 64 to inclusively between 14.0 and 15.9. Can someone explain why this extension is not installed? Thank you!

    I try to install FontAwesomePS_1.0.0 for Photoshop CC15. This extension cannot be mounted, it requires the version of photoshop 64 to inclusively between 14.0 and 15.9. Can someone explain why this extension is not installed? Thank you!

    Looks like you are installing in the extensions manager that is no longer supported for 2015 of CC. Please refer to the CC app instead.

  • I can't find a way to sort the records themselves in alphabetical order by name. I speak not in a display mode, but in how they appear when I click on the tab my favorites. Can someone explain to me how to do this.

    I have a lot of issues of brand book with websites contained in each folder. I'm able to sort sites within each folder alphabetically by name, but I can't find a way to sort the records themselves in alphabetical order by name. I speak not in a display mode, but in how they appear when I click on the tab my favorites. Can someone explain to me how to do other than manually by dragging because it is extremely difficult for me, due to the fact that I am with limited movement tetraplegic hand dexterity

    Folders of bookmarks you created are in the folder Menu bookmarks. "Sort" this folder.

    http://KB.mozillazine.org/Sorting_bookmarks_alphabetically

  • Whenever I try to download a file, I get a message that the internet explore has encountered a problem and need to close. Can someone explain why this is?

    Whenever I try to download a file, I get a message that the internet explore has encountered a problem and need to close. Can someone explain why this is?

    What Service Pack for XP are you running?  You use Internet Explorer 7 or 8?   If so, you can try this article to see if it solves your problem:

    "How to reset Internet Explorer settings"
      <>http://support.Microsoft.com/kb/923737 >

    HTH,
    JW

  • Can someone explain how to order a change of platform, elements PS Windows to Mac? I can't find an option for this in my Adobe ID account

    Can someone explain how to order a change of platform, PS elements of Windows to Mac OS? I can't find an option for this in my Adobe ID account.

    Sorry to hear that.

    Try once link below and check:

    Contact the customer service

  • can someone explain this code

    Hello, when I look at this code, I do not understand a code, can someone explain this code?
    Thank you very much!!!

    The creation of a 'method' for a vector object (in the old style of class definition), which gives it a method with an argument in degrees rotate.

    It replaces the vector existing x and properties of y (in the part "with (this)" code) based on the angle that was passed.

    I don't know if it gives correct results, because I don't check the math/trig, but it is the interpretation of what I see. What exactly do you want explained more in detail?

  • Can someone explain please HTML tags and CSS styles and how to use them with external style sheets?

    I've never used an external stylesheet before and I know that I need to learn, so try it now. I've linked my page etc, but I do not understand why the html tags do not work... can I put only CSS styles in there? Can someone explain simply the best practices here? Thank you very much indeed.

    Ahhhhhhh! I have it! Thank you!

  • Can someone explain these activities on my computer?

    Hello

    Can someone explain these activities? 2 weeks ago I put my computer again on the apple store, because I had strange things on my computer (disabled USB ports, I could start my computer in safe mode only) as a zombie. Now I have again the strange activities:

    I discovered, that this activity does not appear, when I create a new guest account and we who count for surfing the internet. Can someone explain to me what is happening on my computer?

    Stefan sincerely

    Can someone explain to me what is happening on my computer?

    There is nothing unusual is happening on your computer.

    All these processes are normal.

    Messages in the Console are especially for developers to find bugs and improve performance. They almost never mean anything for a normal user.

  • Can someone explain to me why XP sometimes creates a double XP profile.

    Can someone explain to me why XP sometimes creates a double XP profile. For example Neo (domain)?

    Hello

    1. is the computer connected to the domain?
    2. don't you make changes to the computer before the show?

    This behavior can occur if the user profile was deleted manually using the command prompt or by using Windows Explorer. A profile that is manually deleted does not remove the security identifier (SID) of the list of profiles in the registry.

    To resolve this issue, follow these steps:

    1 delete the profile by using the computer properties dialog box. To do this, follow these steps:

    a. click Start, right click my computerand then click Properties.

    b. click on change settings.

    c. in the System Properties dialog box, click the Advanced tab.

    d. under user profiles, click settings.

    e. in the user profiles dialog box, select the profile that you want to remove, click Remove, and then click OK.

    2. click on Start, type regedit in the box Start Search and press ENTER.

    3. Locate, and then expand the following registry subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    4 right-click the SID that you want to remove and then click Remove.

    5 log on to the computer and create a new profile.


    Important
    this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756/) how to back up and restore the registry in Windows.

    You can also download the UPHClean from the following location:
    http://www.Microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=1b286e6d-8912-4e18-B570-42470e2f3582

  • Can someone explain to me exactly what the IP of MSN was going to?

    Can someone explain to me exactly what the IP of MSN was going to?

    Hello

    I suggest you according to the question in this forum and check if that helps:
    http://www.windowslivehelp.com/forums.aspx?ProductID=2

    It will be useful.

  • can someone explain on the drawlist used in listfield

    Hello

    can someone explain on the drawlist used in listfield

    Thank you

    Sujith

    Take a look at the graphics class, it offers all the methods that you can use it.

    for a very simple approach, use graphics.drawText ("your text", 0, y)

    This will cause 'your text' in all the lines of the field.

  • Can someone explain what are installation OS (C :) and a WinRE (r), and what are their functions?)

    Hi I do not know if I put in the correct title apologetic information if I don't.

    Can someone explain what are installation OS (C :) and a WinRE (r), and what are their functions?)

    I am not computer savvy and need help.

    The first has a red bar almost at the end of the box, the latter has a blue bar around to halfway along the area. Hope I gave enough information that someone explain it to me. Thank you.

    caz59

    Original title: hard drives

    The c: drive is where Windows is installed and is running from. The red bar indicates that the disk is full. You will need to do a cleaning to clean the computer and free urgent enough disk space. It may be more prudent to get some hands on assistance with this.

    WinRE is synonymous with the Windows recovery environment and contains an image of the computer, such as provided by the manufacturer. There will be a procedure to cross, which depends on the manufacturer as to what it is. The blue bar indicates there is little space left on the drive though use it to store files may stop the recovery process of work.

Maybe you are looking for