You can use a variable instead of movieclip linkage to addchild?

var high: MovieClip = MovieClip (root);

Top.menu3.addChild (Member [i - 1] .scenarioplayed);

I want to add components to a movieclip based on the value of i.

The clips are named menu3, menu4, etc..

Is there a way to do just what part of "top.menu3" a variable?

I tried this but had a compilation error:

Symbol "scene3', layer 'Actions', image1, line 1611061: call to a method perhaps addChild undefined, through a reference with static type String.

var menuName:String;

menuName = "top.menu5";

menuName.addChild(member[i-1].scenarioplayed);

For the code you just showed, NomMenu is a string.  String do not have a method addChild.

We know not what you work with to get what you want, but if you want to use string to the objects of the target values, you can use the notation of support...

var menuObject:MovieClip = top ['menu5'];

menuObject.addChild(member[i-1].scenarioplayed);

Tags: Adobe Animate

Similar Questions

  • You can use a variable as a variable name as you can do it in Perl?

    So say there are 10 clips on the stage, each named mc1 mc2 mc3 etc. I have a function that sends the name of a movieclip in a public class, and I need to be able to change the image of this movieclip according to the string that is sent. Say so my class is the function declaration:

    moveFrame (theMovieClip);

    where theMovieClip is the object returned by another function.

    Is it possible to use this variable somehow?

    The concept of what I'm trying to do:

    function moveFrame (s) {}

    s.gotoAndStop ("the framework law");

    }

    Who is? Is this possible or should I find another solution?

    If the argument of the function (s) pointing to the object, then your code as shown should work.

    s.gotoAndStop ("the framework law");

    If the argument points to the name property of the object, then you will need to use the getChildByName() method to target the instance.

    this.getChildByName (s) .gotoAndStop ("the framework law");

    If the argument is a string version of the name of the instanceobject, you can use the support rating to target the object...

    This [s] .gotoAndStop ("environment law");

  • Business rule can use replacement variables in Essbase?

    Hi all

    I use Hyperion Essbase, EAS and planning with the version 9.3.1.

    1 can. business rule we use replacement variables in Essbase?

    2. how to update the rule of business planning workspace changes?

    See you soon,.
    Simon

    Hello

    Yes you can use substitution variables, as calc scripts use the ampersand & and name of the variable, for example & CurrYr

    I don't know what you mean by the second question, if you make changes to the business rules in the environmental assessments, so that all you have to do, planning of calls is the same repository for information of business rule.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • You can use a win 7 Home premium... to activate win 7 starter?

    I bought two copies of Win 7 Home Premium.  I have replaced the hd in my acer netbook and want to install win 7 starter instead of xp.  You can use a win 7 Home premium... to activate win 7 starter?

    Thank you.

    No, you can't. Windows 7 Starter Edition requires a product key of Windows 7 Starter.

    Since you have two licenses for Windows 7 Home Premium, why not use one of them?

  • You can use a zip for time machine drive?

    I know he said 'external hard drive', but do not know if this means that you can use a zip for time machine drive? (including so you can back up your entire OS, but also files)

    Probably yes, but just wonder how to connect ZIP drive to your iMac.

  • You can use 3rd party to watch network shows?

    I think to make the new gen 4 tv Apple, you can use 3rd party applications to watch shows like Animal Planet network with Animal Planet app?

    Generally Yes, if the channel provided an application. If it's a cable network, you still need a cable provider to access the internet version, and you can access channels in your package.

  • You can use your Apple Watch for swimming?

    You can use your Apple Watch for swimming?

    Benson,

    Follow the advice of Carolyn Samit and al in Re: swim with the watch is it possible?

  • You can use my Mac with iOS

    You can use my Mac with iOS

    Hello ifixer2,

    Thank you for using communities of Apple Support.

    No, you need two or more Mac computers that meet the following requirements to use Back to My Mac:

    What you'll need

    To configure and use Back to My Mac, you need these things:

    • Two or more Mac computers that use the same account iCloud on OS X Lion v10.7.5 or later version.
    • A Terminal supported access AirPort (AirPort Extreme, AirPort Express or AirPort Time Capsule) or other Internet router that supports UPnP or NAT - PMP protocol, with the latest firmware available. AirPort base stations require version of firmware 7.6.1 or later for Back to My Mac.
    • Utility airPort 6.3 or later.
    • For screen sharing, a 300 Kbits/s-or-more rapid, bidirectional (high-low) Internet connection between computers. You may be able to use with slower connections to share files. If file sharing doesn't work as you think, check your settings and connections.
    • A firewall that allows remote connections. Some firewalls may prevent some back to my Mac connections. For example, when you're at home, don't maybe not able to connect you to your Mac at work. But when you're at work, you might be able to connect to your Mac at home. If you are not sure if the firewall will allow the back to my Mac connections, check with the network administrator for your organization.

    If you want to use an AirPort Extreme or airport Time Capsule to access files on a hard drive external, you need a Mac OS extended (journaled) formatted USB hard drive. When you use with Back to My Mac, your hard drive is displayed as the base under shared in the sidebar station Finder.

    Set up and use Back to My Mac

    Take care.

  • You can use an external hard drive with the Mac Mini?

    I've seen videos that say that we cannot increase the ram on a min of Mac, but I'm curious if this works like an ordinary computer, if we can attach an external hard drive to store some of the memory to free up space. Sorry if this is something stupid just need to know what I can do with it.

    You can use an external hard drive to boot and run with any Mac. Its not going to improve or replace your ram. If you use a mechanical hard drive in any Mac then help and boot from an external drive, especially if it's a SSD will be significantly faster.

  • You can use a Windows 7 product key to activate 10 Windows on a Mac?

    The iMac is El Capitan (10.11.3) running and does not support a full download of Windows 7. You can use a Windows 7 product key to install Windows 10 using an unused victory. 7 product key?

    What is the year/model of your iMac? Depending on your model/year, W7 is supported. 2015 macs don't support W7.

    See also install Windows 7 and previous versions on your Mac with Boot Camp - Apple Support .

  • You can use old iMac as a monitor for mini Mac

    You can use 2008 iMac as a monitor for mini Mac?

    No, because the iMac of 2008 not display entered or supported to do so.

    See > use your iMac as a display with the target - Apple Support Display Mode

    You can use a connection network and something like ScreenRecycler

    See > https://www.screenrecycler.com/ScreenRecycler.html

    However, the best bet is to use a regular external monitor with the Mac Mini.

  • You can use Skype credit to make calls without wifi?

    Hello so my question is this.

    I'm really far from were I live and I don't want to make a cell phone plan, I don't think I'll have wifi, a friend told me I should try using Skype and Skype credit purchase, so my question is.

    Can make you calls using Skype credit without access to wifi?

    You can use Skype wifi using Skype credit? (read something some time ago, but do not pay attention)

    If I have Skype credit can I call my boyfriend to the Canada when I am in another country? without wifi or a cell plan?

    All Skype calls, paid or free, require connection to the Internet. If you do not have access to WiFi or cellular data, you will not be able to make Skype calls.

  • You can use credit balance account Apple iTunes to purchase the subscription to the magazine.

    I downloaded the app on app store, buy a subscription for one year of the magazine could I use my apple balance on my account, or if I have to enter a credit card?

    Yes, you can use iTunes credit to pay subscriptions to magazines.

    See your credit balance - Apple Support iTunes

  • Is there a limit on the number of times you can use a disk operating system Windows 8 pro?

    So I got an operating system disk with my laptop, I used a disc of Windows 7 on it. My brother has used the disc 8.1 on its newly build pc, it worked. When I tried on my new pc it says that some files are missing or damaged. I wonder now if you can only use it once.

    Hello

    You can use several times on THE same machine. You can install on many machines, but you can turn on a SINGLE machine. In your case, the system thinks you want to update and it will not work. You must purchase the upgrade dics (DVD).

    Kind regards.

  • iPad Pro. The keyboard can be used remotely (not physically attached) or you can use a standard apple wireless keyboard

    iPad Pro. The keyboard can be used remotely (not physically attached) or you can use a standard apple wireless keyboard

    I assume that you mean the keyboard built into the 'smart cover' - it must be in contact with the iPad.

    A wireless keyboard Apple has been reported as working with an iPad Pro. Plug Apple for the new State of "magic keyboard" that it requires a Mac with os x 10.11 or later - he does not mention the iPads. Third-party Bluetooth keyboard should work.

Maybe you are looking for

  • Problems... Once again.

    Hello, I got my iPhone 5s today, and I just noticed that my locking/unlocking button is loose, and I don't know if it's normal, that's why I'm asking here, and my home button also makes a very loud rattling noise, I don't know if this is not normal e

  • We are sorry internal error?

    Just when I'm all for work. Now, I can not connect my web data. I get a screen "we're sorry". (See the image) Please fix this! Thank you fxrunner

  • How to set up iPhoto to import by default?

    My wife a lot like iPhoto in Photo as an application and want iPhoto to open instead of the Photo when a camera card is inserted. I'm not finding a way to implement that. I searched the forum and found a set of instructions on setting the preferences

  • Server 2003 keeps encountering unexpected reboots

    Hello I really need help with that. We have a Windows Server 2003 Standard Edition R2 SP3. We have updated all the drivers of devices, run the updates of windows, reinstall hardware and blown out server (to remove fragments of dust).  The server keep

  • Unable to recover the TCP/IP connectivity & corrupt Winsock keys with error code 11003

    After being unable to solve the problems created by the McAfee download causing failure DComm and lost connectivity I uninstalled SP 3 and reinstalled. I have a corrupted Winsock2 registry and auto config proxy TCP/IP keys and detect the proxy appear