Pinning an object with another object in canvas.

Hi all

I have an object, which can be moved. I have another object which must be pinned with the first object (with 5 px padding).
So if you drag the first object, the second object also move with it.
I know that we can define X and position Y the second object with the first object as follows.
object2.x = object1.x + 5;

object2.y = object1.y + 5;

but the problem is that as soon as I start to drag the first object, second object remains at his post.

No idea how to do this.
Thank you...

Add an event listener to the ticker that calls a function that updates the position of object2.

Tags: Adobe Animate

Similar Questions

  • How do I know if a class LV object has a relationship of 'is - a' with another class?

    Hi all

    I have a question LVOOP.

    Let's say I have a class object. The class of the object, it's that I have developed. Now, I would like to know if the object has a relationship of 'is - a' with another class.

    How can I do?

    One solution I have is to use "more specific class ' and check the status of the error. But I thought that there is a better way that I don't know.

    Thank you

    TailOfGon wrote:

    One solution I have is to use "more specific class ' and check the status of the error. But I thought that there is a better way that I don't know.

    It is the right solution. What dislikes on this subject?

  • This email address is already in use with another Apple ID

    Hi, I had a problem with the evolution of my apple ID, that I had two Apple id and I wanted to use the Email address I have objective for labor and official use, the other is that my backup and everything in it, was that I created in my teens, if the Email is very unprofessional I removed my official email address of this apple ID and when I try to add in the apple ID , I use currently it is said that "' this Email address is already in use with another Apple ID" when it's actually longer, how can I swtich my official Email deal with my Apple ID? " Please help and thank you,

    I'm not sure to understand how you use your Apple ID... it seems that you want to have your communication and purchases on that 'professional' - work and personal communications, games, music, etc. on another.

    Both should be saved.

    All the data associated with an identifier Apple is always linked to this identifier to Apple.

    If you have changed your e-mail address to manage your Apple ID , you may need to Contact Apple for the Apple ID account security support

  • How to fill one shape with another shape, but not of models

    Hello

    How to fill one shape with another shape, but not of models. Example of this poster

    Screen Shot 2015-05-18 at 13.41.33.png

    put in a shape of the tree so that it looks like this:

    Heavy_type_tree.jpg

    Select your type with a vector path, which is the subject

    Object > envelope distort > make with top object.

  • How can I transfer photos from my iPod touch 6th generation for my macbook pro WITHOUT using iCloud, please? It's simple with another camera but not the case, it seems, for the Apple iPod

    How can I transfer photos from my iPod touch 6th generation for my macbook pro WITHOUT using iCloud, please? It's simple with another camera but not the case, it seems, for the iPod Touch from Apple.

    Use import option from your Mac:

    Import photos and videos from your iPhone, iPad or iPod touch - Apple Support

  • associated with another iPhone Apple - not mine ID!

    I bought a second hand iPhone retailer (not Apple) online. When I try to get help with this phone, Apple told me that the phone is associated with another Apple (not mine) ID so that they cannot help me. What should do?

    There is nothing you can do except return it for a refund.

  • Retrieve text messages from old iphone with another carrier and its been reset?

    Is it possible to retrieve text messages from old iphone with another carrier and its been reset? I have an iphone 4 that was with att then I switched to tmobile and I reset it as I was planninging on selligg, but I face some legal issues and I was wondering if it was still possible to be able to retrieve these messages? I also have an iphone 4S that I used after that id like these old messages tmobile too and I am currently usin g an iphone 5 c If anyone knows or can help make em let me know please thanks

    If you have a backup of the 4 from iTunes or iCloud, messages can be in there.

  • You need to reset and or change my old icloud account of moms on the phone with another. When I try to reset it with the information that we know that it says "blocked account"

    You need to reset and or change my old iCloud account of moms on the phone with another. When I try to reset it with the information that we know that it says "blocked account"

    ACCOUNT SAFETY CONTACT NUMBERS

  • Using Sansung S3, not yet possible to share all the tabs opened (using NFC) with another phone NFC. But only the a main tab, I'm currently browsing is possible.

    Sansung S3 using, Android 4.1.2 Firefox 24.0; not yet possible to share all the tabs opened (using NFC) with another phone NFC. But only the a main tab, I'm currently browsing is possible to share. It is the function of current NFC function of Firefox?
    If so, when will it feature to share all the tabs?
    Thank you.

    I don't know if we implement this. Sharing of all the tabs you have open have many security and privacy issues. Someone forget that they had a tab open, they didn't want to share or miss-clicks on the sharing of all the option.

    We are looking for ways to better share tabs with devices that are located nearby. Especially if they are on the same WiFi network.

  • Extend my extreme network with another extreme - waiting for internet access

    Hello - I have a new generation Airport Extreme (let's call it Extreme1) connected to a Comcast modem and it works very well. The extreme will be the router that the modem has no router function. I'm trying to expand my network to another room with another extreme (let's call it Extreme2). I have a connection cable between two rooms. Extreme1 has an ethernet cable from one of its LAN ports connected on port WAN Extreme2. When I try to create a new network with Extreme2 (in aid of the same name, passwords, etc.) it does not work. He was suspended at the end when he is looking for a connection ("Waiting for internet access")-I did the following things based on what I read here:

    1. Changed IPv6 link local parameters
    2. Tried the whole upward on my Macbook and tried on my iphone
    3. The Wan first and then tried to change the configuration after you done for Extreme2 by creating a network
    4. Tried to create a network with Extreme2 connected directly to the modem
    5. Extreme2 factory reset after every attepmt

    And nothing works. Kicker is, I also have a reasonably new airport express and the same thing happens to her as well.

    Do I need to adjust some parameters of network that I'm not aware of? Is it possible that my LAN ports are disabled on Extreme2? It is brand new.

    Thanks for any help.

    Have you used the Apple Setup Assistant?  If you did, it had notified you that the extreme second was being configured "add using Ethernet. The wizard will automatically configure the second airport with the appropriate settings for you.  All you have to do is enter a name of device for the second AirPort Extreme.

    Here I'm assuming that you reset the second extreme to parameters by default until you set it up again and that your second Extreme is the current version of the "tower" or that of previous versions "flat or square.

    The example below shows an AirPort Express as the device which is the extension of the network, but you will see the name of your network and AirPort Extreme on your configuration screen.

    Post back if you need some tips on using the "Wizard" for your configuration.

  • How can I share my books with another user?

    How can I share my books with another use?

    Your iBook and anything else that you have downloaded from the iTunes Store, are related (and allowed) to your account - they can be shared or loaned to other users.

  • "This device is already associated with one identifier Apple" "If you can also download past purchases with your Apple ID, you don't auto download or download past purchases with another Apple ID for 90 days.

    I had damaged my phone and Rec'd a refurbished Iphone s 5, Assurian, for an insurance claim.  (all transferred, but the phone was defective and returned and replaced with another refurbished iPhone 5 s) Yet once implemented with the help of AT & T Tech support Pro, everything goes fine until I realized that, although transferred to my iTunes library, when I went to play a song, I got the following message...

    "This device is already bound with one identifier Apple."

    "If you can also download past purchases with your Apple ID, you don't auto download or download past purchases with another Apple ID for 90 days.

    I've had several I phone and I have never encountered this problem. It gives me the option to cancel or transfer, however, I'm afraid of something disorder which could cause me to lose my purchased music or cause other problems... everyone has ever encountered this problem? or know what to do about it? Thank you

    You will not lose your purchases related to your Apple ID

    It seems that the device you have was not properly separated from its prior owner, before to be delivered to your

    Settings - iCloud - which is your current Apple you see there ID?

  • Re: Satellite A300-234 - product key does not work with another disk the

    Broke the new Satellite A300-234, flied Windows Vista. I did not the backup copy of the system. At the system from a disk of another laptop Toshiba A200-23d.

    The key away. What should do?

    Hello

    The point is that the product key from the underside of the laptop can t be used with another drive in Windows. It s just for the preinstalled OEM version and doesn t work with other versions.

    Normally you n t have to enter a product key if you are using the Toshiba recovery disc because it contains a picture of the factory settings and is different from a disc of Microsoft Vista.

    Anyway, as said Akuma you can order a new drive Toshiba Recovery directly.
    The another model of laptop recovery disk will not work because the hardware is different.

    Good bye

  • HP: unlock OEM windows 7 for use with another computer?

    Hello

    I recently got a HP computer with an OEM windows installation 7. After the machine (fatal hardware failure), I tried to use the windows key to install it on another computer. However, the key is an OEM product and would not activate, so after talking to microsoft they sent me here to ask if the manufacturer could "unlock" the key for use with another computer (that I build from scratch).

    So all this possible? Or do I have to buy a new license?

    Okay, Ive talked to HP and microsoft and it turns out that the key has been blocked (pirates). So much for the purchase of second hand.

  • can I share documents in iCloud drive with another drive to iCloud user?

    can I share documents in iCloud drive with another drive to iCloud user?  If so, how to do that?

    No, at the present time, iCloud is configured for use by a single account to share data between devices of the owner of this account.  Your best bet for what you are looking for would be to use a third party application like Dropbox or Google Drive.

    You can share files individual even if - iWork sharing links to documents in iCloud - Support Apple iWork

  • Why safari does not freeze when I erase a research question and replace it with another search?

    Hello. When I search on Safari, it freezes in the following situation: I have run a search by typing in the search bar. The search results I get, it's not what I wanted, so I erase the question of search and replace it with another question of research. Instead of a new search result that Safari freezes. What is going on?

    IOS 9.2.1 does not run on iMac, as shown in your profile. If you want to help, at the very least, we need to know that the version of Mac OS X installed. If you are not sure, please click on the Apple symbol in the upper left of the screen and select about this Mac.

Maybe you are looking for