How can I nominate a MovieClip with as3?

I'm trying to draw a set number of places in a presentation of type grid and pretty much getting it to do what I want. The problem is I want to be able to manipulate each square individually more later on, and I'm sure I need to assign each a unique instance... name something like "square_0_0" at the bottom "square_10_10" (this is a table of the 10 x 10 squares).

In any case... How to assign a unique for each square instance name, as it is added to the stage? I have attached the code that I currently have running. Thanks in advance for any help you can offer.

MovieClip have a name property that allows you to assign:

Shape.Name = "shape_" c + "_" + r;

Tags: Adobe Animate

Similar Questions

  • How to access the inside movieclip with AS3

    Hello

    I have a problem to access inside the movieclip I mean child MovieClip

    the code is here

    var myMovie:MovieClip = new MovieClip();

    addChild (myMovie);

    var myChild:Sprite = new Sprite();

    myMovie.addChild (myChild);

    var nextChild:Sprite = new Sprite();

    myChild.addChild (nextChild);

    now I want to acess the next child and I use following

    (myMovie.myChild.nextChild) .addEventListener (MouseEvent.Click, onChildClick);

    function onChildClick(evt:MouseEvent):void

    {

    trace ("last child is clicked");

    }

    Thank you

    When you create dynamic content, using the notation by point does not work and you must use... getChild methods if you want to access it through the parents.  However, you should not need to do since you already have a direct reference to the object...

    nextChild.addEventListener (MouseEvent.CLICK, onChildClick);

    function onChildClick(evt:MouseEvent):void

    {

    trace ("last child is clicked");

    }

    You probably might have realized this when you implement this line (assuming it worked)...

    myChild.addChild (nextChild);

    With the approach of targeting parent, wouldn't you have tried to use... myMovie.myChild.addChild (nextChild);?

    and 'Click' should be 'CLICK '.

  • How can I sync my iPhone with my mac mail

    iPhone 6s (iOS 9.3.4), McBook Air (El Capitan 10.11.6)

    How can I sync my iPhone with my mac mail without using iCloud?

    I use several 'GMX' and 'Web' of e-mail accounts.

    When I send email from my iPhone, they are only saved on it, but neither on the (GMX / Web) server or on my Mac.

    For e-mail accounts to synchronize between devices, they must be configured as IMAP accounts. POP protocol doesn't have this capability.

  • How can I default *.ics opening with lightning?

    Hi all
    I run a Linux desktop and use 3.3 TB with a Flash of the extension. I would like to open files *.ics with lightning (to define an event) and not with TB (to create a mail). But when I download a *.ics Internet my FF browser offers only "Thunderbird" to open the file with. But the *.ics with TB opening creates a new mail with attachment the *.ics file. How can I default to open with lightning calendar?

    Thanks in advance.

    You need to import the .ics file into lightning.
    In the Schedule tab:
    "Import events and tasks (Alt - N)-

  • How can I sync my IPhone with Foxbrowser?

    Hello. The question is: How can I sync my IPhone with Foxbrowser?

    I just installed Foxbrowser on my IPhone 5 (iOS 7), because I don't like Safari. It would also be nice to use my Firefox bookmarks synchronized. To use Foxbrowser at all, I have to sync it with my Firefox account. I have an account in Firefox, with which I synced things with several desktop PC.

    Instructions on Foxbrowser say that I must add my IPhone to my sync account. Firefox instructions tell me to enter: home page in the address bar, click Sync at the bottom, then "Sync" at the top of the window Options, and then click "associate a device. Problem, no link of 'Pair device' appears. All I get are "Terms of Service" and "Privacy" links that are empty when I click on them.

    I use Firefox 30.0. I don't know if it's important, but I use custom theme restaurateur.

    Many have asked this "Pair of a device" problem, and I've not seen a solution. Mozilla has help on Android devices adding pages, which do not mention IPhone.

    Foxbrowser offers an option to add my IPhone to sync if I'm not near my computer. Instructions are poor, there is a fear "warning: use at own risk" warning and it does not work.

    Apart from that, my experiences of synchronization have been positive. Firefox Help pages were little help and I had to do a lot of guesswork, but once I got it, it worked fine.

    Foxbrowser is not built, or supported by Mozilla, so we can't really support. Mozilla doesn't support any application on the iPhone in some way because of the restrictive of Apple being placed competing technology prevention policy on the device. To really sync with Firefox Desktop, you must use an installed with Firefox for Android Android, or eventually filed.

  • 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.

  • How can I read a pdf with ebook reader Touch samo

    How can I read a pdf with ebook reader and where I could put the pdf in the day

    > where I could put the pdf in the day
    You can put the files on the SD card that can be inserted into the slot for SD card available on the left. Supported file formats are: PDF and EPUB

  • How can I turn off TV with my remote?

    How can I turn off TV with my remote?

    Try here > http://osxdaily.com/2016/01/03/howto-turn-off-apple-tv/

    It may depend on what generation Apple TV you have.

  • If I have to reinstall Firefox 3.66, how can I transfer my firefox with my favorites, etc. profile?

    If I have to reinstall Firefox 3.66, how can I transfer my firefox with my favorites, etc. profile?

    User Agent

    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)

    Have a look here
    Profiles - where Firefox stores your bookmarks, passwords and other user data
    There are links to pages showing you how to move your profile etc.

    If you reinstall on the same machine, it will find your existing profile however.

  • How can I use the AppleCare with replacements USA helmet in Israel?

    How can I use an AppleCare with replacements USA headphones for my iphone in Israel 6plus? Am I covered overseas?

    Technically, no. The warranty is valid only in the country where the phone was originally sold. However, that restriction is based on the differences between the models of phones sold in different countries and the availability of substitutes service. You may very well be able to get the headphones replaced here since there is no difference between those who were included in phones AND those that are included with the phones sold in your country. Make an appointment at the genius bar or take it to your local CENTER and see what they can do for you.

  • How can I share my library with all my devices

    How can I share my library with all my devices?

    In the article to share your iTunes library on your home - network Support Apple its pretty simple from what I've read, just make sure you have sharing options enabled in iTunes on your computer.

    Just make sure that you are signed in the same Apple ID on all your devices and turn on sharing House on each of them as well and make sure that you are connected to the same network, trying to share the library.

  • How can I create several rectangles with a draw rect.vi

    How can I create several rectangles with a fire rect.vi? Thank you

    Like this...

    -DP

  • How can I scan a document with mutiple pages into a single file?

    Hello

    I have a HP 3070 and Windows Vista. The printer and scanner are properly configured. But there's something that intrigues me:

    How can I scan a document with mutiple pages into a single file?

    I start the HP scanning software and choose pdf or tif format. The analysis of the option of single file for each page is unchecked. Once I scanned the first page it has no option to scan additional pages? I got back, save and

    Thanks in advance

    Hello

    The HP software disables scanning multipage when the resolution is greater than 300 dpi. The resolution of the issue is to reduce equal to or less than 300 dpi scanning resolution.

    Thanks and greetings

  • Just bought a new computer. an old crashed. How can I sync my iphone with the new computer?

    just bought a new computer. an old crashed. How can I sync my iphone with the new computer?

    Original title: sync

    Ask the question in the Apple Forums:
    https://discussions.Apple.com/index.jspa

  • How can I fix a problem with AlerteGPS_G520

    Hello here is my question...

    How can I fix a problem with AlerteGPS_G520

    Hello
    I suggest you contact the manufacturer of the product.
    Be sure to provide all the details.
    b Eddie

Maybe you are looking for