How can I change the content of a string when I click on an image?

I have hundreds of images that need to play a unique sound when you click it.  In order to simplify the construction of this flash file, I need to simplify in a manner that will allow me to change one word.  Some examples of code.  I think that the reason why this does not work, what I'm declaring 'word' twice... suggestions anyone?  Thanks in advance...



var password: String = "family".

trace (word + "_nv")

This [word + "_nv"] .addEventListener (MouseEvent.CLICK, playaudio);

This [word + "_nv"] .buttonMode = true;

var password: String = "grandchildren".

trace (word + "_nv")

This [word + "_nv"] .addEventListener (MouseEvent.CLICK, playaudio);

This [word + "_nv"] .buttonMode = true;

function playaudio (event: MouseEvent): void {}

this [word + "_nv"] .play)



I see no where what you show is simplify anything.  This would save code in order to use only the strings rather than assign the string to variables and using variables.  In all cases. Yes, you do not want to declare the same variable twice (only use "var").  And your playaudio function will not work with whatever the last value of 'word' that you assign.

To simplify the code, you can name each mc using a digital increment (mc_1, mc_2, mc_3, etc.), and then assign your headset in just a few lines by using a loop.  In audio playback function, you can use the name of the instance of the event.currentTarget.

This [Event.currentTarget.Name]. Play();

or even

MovieClip (event.currentTarget) .play ();

Tags: Adobe Animate

Similar Questions

  • I need to create a table of contents in iPages but I want only one word for the title, not the line of holes. Or, how can I change the contents of the table? Thank you!

    I need to create a table of contents in iPages but I want only one word for the title, not the line of holes. Or, how can I change the contents of the table? Thank you!

    Yes, you can have a one word title, by assigning a paragraph style title to this one word. No, you cannot change the text in a Table of contents, but you can change paragraph style font attributes (line) and add for example, a head of points between the types of OCD paragraph and page numbers. No part of the table of contents will not provide hyperlinks in exported PDF documents.

    When you look up in the menu bar, you can see the word iPages, or simply Pages. There is no product of iPages.

  • How can I change the settings of "undisclosed recipients" when send mail.  New to using a Mac.  Thank you

    How can I change the settings of "undisclosed recipients" on my Mac Mini... new to using Mac!  Thank you

    What you mean?

    If you enter a recipient in the BCC line other recipients will not see another. Recipients will see undisclosed recipients.

    Leave the line blank

  • How can I change the letter of a device when it is not an option?

    I recently bought a WD My Passport Essential 500 GIG hard, and the problem is, I plugged on an Apple Macbook and added all my Itunes Music on the hard disk.  Then from there I connected on an Asus laptop, running windows XP.  I was wondering why it would not be displayed in my computer. I couldn't find it so I looked in Device Manager and I saw she didn't have a drive letter, I can't change the letter because it is not an option. How can I change the letter when it is not an option, all it says is HELP in option

  • How can we change the way Media Player displays when minimize?

    Windows Media Player (9 Series) displays a Panel on the right side of the taskbar when minimized. How can I change that so it displays like most other programs - as just a tab in the taskbar?

    Right-click on an empty space on your taskbar, right-click > toolbars then uncheck Windows Media Player

    Hope this helps
  • How can I change the country in payment Options when trying to buy apps with my credit card?

    I just bought a new windows Tablet pre-installed with windows 8 and then transferred to China for his work.  When I go to the store, I can't change the country when entering my payment Options (credit card).  Can you help me understand this could?

    Hi Russ,

    You try to buy from Microsoft Store of China with a credit card from another country?

    You can follow the steps in the link below to purchase from another country.

    Using the Windows store in another country or region

    You can see the link given below as well.

    Method of payment for the editing windows store and view billing history

    Email us if you have any further questions. We will help you to come.

  • How can I change the text in a string of Coldfusion?

    Hello! I have a ColdFusion variable, which contains a URL:

    "For example, it looks like to <iframe width="640" height="360" src=" "/ /" frameborder= "0" allowfullscreen>< /iframe >.

    I want to do is replace the width of "640" by that of "450" and height of "360" with "253". I'm passing a string in an 'if' statement that will change the variables if the conditions are met. I can't change the variables before making it a string. I need to change the variables.

    What is the best way to do this in ColdFusion? I don't know this language (my expertise is more in JavaScript and PHP), I appreciate any help you could give me.

    Thank you very much for your help!


    Take a look at the Replace() function. It allows you to replace one substring with another.

    See you soon


  • How can I change the contents of the 'most visited' in the Menu bar

    Once Firefox stores 10 entries in "Most visited", there seems to be no way to change these entries (e.g. the installation program "Most visited" while it contains links to Web sites that I want under "Most visited").

    When you search Firefox HELP 'most visited' you don't even no matter what success there.

    You don't control that made the request, you can change the query, you can prefer 20 hits instead. The search for the address bar with the "AwesomeBar" feature might be more to your liking. In any case do not remove the entries in "Most visited" as you would remove real history

    Most visited - bookmark smart folders - recently visited (history)
    After the creation of the bookmark to a "smart folder", you must, restart Firefox, after which the bookmark looks like a folder and will work properly.
    related: (marked old)

    AwesomeBar feature allows you to search your history and bookmarks in the location bar to (forward) press "Enter". See the address bar search (internal - full Auto)

    See picture of some: I use the AwsomeBar internal search function-related configuration parameters.

  • How can I change the content of the drop-down list window which shows after JUST click the button START

    The window appears after using the right click on the mouse. Before I had a Tech. remove a Trojan visuses the window showed just find, Explorer, Delete, now it showes such articles that take control, Google, download of virus total.etc.  So, how can I get rid of items that I don't want?

    The menu that appears when you right-click is called the "context menu", and various third-party applications can install entries here.  You have several choices regarding the removal of these entries:

    1. If you can determine what application is involved, you can see if the application has a configuration or menu options enabling to customize what appears in the context menu.

    2. If you can determine what application is involved and that you no longer want or need this app, you can uninstall it.  Praseetha K is close, but no cigar gets.  Virus Total is an online service that checks uploaded for viruses, files.  Virus Total also offers a "upload" allowing you to download suspicious files by right-clicking (see  You can decide if you want. If this is not the case, simply uninstall it.

    3. If you are unable to determine what application is involved, or you want to keep the application but it does not offer a configuration without the context menu item, download ShellExView and you will probably be able to go to the bottom of things pretty quickly.

  • How can I change the contents of a text field in a PDF form with a defined variable?

    Hi all!

    First time poster and getting quite frustrated trying to understand this issue. Here's the scenario: I use Acrobat Pro 10 to create what is essentially a form of giant order. I have designed the document in InDesign, defined the various buttons and other whatnot and then it exported to Acrobat to continue the construction of the form.

    I have a radio button group called 'conference_opportunities' that contains different options at different prices, so they are all the same, but have different values (so that they belong to the same group and only one can be selected at a time).

    What I've done is created a 'MouseDown' event on the button that sets a variable called 'ConferenceOpportunity', which is equivalent to the title of the option they pick. Then, I want to take this variable and display in a text box called "Conference_Option". I use a variable because my radio buttons values are actual prices of the option they pick, so I can't set the value as the title of the option.

    If its an array of boxes and option at the bottom of the page, there is the Option that they selected, the quantity (which can change) and value (in dollars)

    I also then want to display this variable at the end of the document as a kind of summary of what they have chosen to buy as well, but I guess it's the same code.

    I'm not an expert at all Javascript, so code snippets would help greatly. I looked on the Document from Adobe on the SDK and API and have not been able to find a solution. I also turned to the Almighty google and still no luck.

    Any help would be greatly appreciated!

    Thank you all

    Right now, you have to do is use this variable to the value property of your text field... Then add this at the end of your code:

    this.getField("Conference_Option").value = ConferenceOpportunity;

    Also, I would use not MouseDown, MouseUp.

  • How can I change the web page by default when I open additional tabs?

    My home page is set to the default normal page but when I open additional tabs a Yahoo page opens and I don't use it and don't want to do anything with it. I used to get the search page Google/MOY. This only happens when I open additional tabs.

    So, how to set the page that opens when I open additional tabs?

    Thank you!

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste newtab and make a pause so that the list is filtered

    (3) double-click the preference browser.newtab.url and enter your favorite page:

    • (Default) page thumbnails = > subject: newtab
    • Blank tab = > subject: empty
    • Built-in Firefox homepage = > topic: welcome
    • Any other page = > full URL of the page

    Press Ctrl + t to open a new tab and check that it worked. Fixed?

    Some traps:

    If Firefox will not let you change this setting: you can have what is called SearchProtect on your system.

    Firefox if allows you to save your changes, but he doesn't know: one of your extensions may be the substitution of her. You can consult, disable and/or remove extensions on page modules. Either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. Then take a critical look at the list to the right. (It is possible, that you have a bunch of shit with something free that you recently downloaded).

    If the modification works during your session, but during the next startup is leads to: you could have a user.js file in your personal settings Firefox (your Firefox profile folder). This article describes how to track down and delete the file: How to fix preferences that will not save.

    A little luck?

  • (How) Can I change the priority for execution vi when running

    Hi all

    I use the demons (free running VI) and I communicate them through queues.

    They are part of my architecture of device driver and use a producer (of the Acquisition) architecture or Architecture consumer (for control)

    I have a single VI demon I deploy an 'object of device' using a class polymorphic implimentation.

    This implimentation has a deficit of subtle,

    I'm not able to change the priority for execution to the launch

    There is a property node taunts that it is possible, but the assistance (and run the error message) says not available during execution.

    Anyone know of another method?

    Here's what I thought about so far:

    1. do you have 5 different demons with different priorities [Distasteful for the maintenance of the Code]

    2. make low priority and ensure that at least 1 VI in the driver has a highest priority [do not know if it works, mask implimentation]

    Kind regards

    Tim L.

    You might think about putting a timed loop or timed sequence in your daemon and then passing a value of digital priority to your demon. This is the best solution I can think.

  • How can I change the settings of heap memory when CF does not start?

    I am rewriting a web application that someone else has done a very bad job on, including database design.

    While reviewing the existing database, I came across a "OutOfMemoryError: Java heap space" error, I went to the CF Admin and hit the setting between 512 to 2048 (CF8 Developer Edition).

    Now I can't get CF at startup, and as such I can't get in the CF Admin to change the setting back.  Is it possible to fix this without reinstalling CF?

    It's a little version and edition of charge, so just open a CMD window CD at the base of your installation (for example, C:\ColdFusion9) and dir a ShadoMX/util/Flex/SDK/bin/jvm.config DIR/S to search for the config file.  Then just open it in Notepad, etc. and set the parameter memory.


  • How can I change the tab settings so that when I manually opened a new tab, my home page opens in it?

    Internet Explorer provides the following options to open a new tab:
    "When a new tab is opened, open:
    -A blank Page
    -The new tab Page
    -Your first homepage.

    On Firefox 3.6.10, the only option is the new tab page. If you click on 'Close' an empty page is displayed. There is no option for a new tab, open your homepage.

    In addition, you cannot right click the home button to 'open in a new tab '.

    Y at - it a shortcut for this, and if not, can firefox include this option in the next version?

    Middle or {Ctrl + click} Home button-click to open your home page in a new tab. Or you can add this functionality via an extension.

    New tab homepage extension:

  • How can I change the programs that start automatically when I turn on my computer?

    I have several programs that slow down my departure upward.  I didn't not use programs and would that they won't start does not automatically.

    I have several programs that slow down my departure upward.  I didn't not use programs and would that they won't start does not automatically.

    First of all, note that you should be in * all * the programs that start automatically, not only with those who are in the system tray. Not all the programs auto-start manifesting by an icon in the status bar.

    On each program, you don't want to automatically start, check its Options to see if she has the choice to not start (make sure that you actually choose to not run, not simply a "don't display the icon" option). Many can easily and better be arrested like that. If this does not work, run MSCONFIG from the start. Run the line and on the Startup tab, uncheck the programs that you do not want to automatically start.

    However, if I were you, I wouldn't do this just for the purpose of the minimum number of running programs. Despite what a lot of people tell you, you should be concerned, not with the way * a lot * of these programs you run, but * that *. Some of them can seriously affect the performance, but others have no effect on performance.

    Don't stop all programs to run willy-nilly. What you need to do is to determine what each program is that its value is for you and what the performance cost is running all the time. You can try searching the Internet and ask questions about the details here.

    Once you have this information, you can make a smart informed decision on what you want to keep and what you want to get rid of.

Maybe you are looking for

  • Photosmart 3310: photosmart 3310 windows 10 - printer not found

    I bought a new computer (Lenovo: 30) and immediately updated for Windows 8.1 to 10. I ran the Print and Scan doctor who has downloaded the latest version of the software, HP Photosmart and Officejet full feature software and drivers - Full_Webpack -

  • Detecting by programming PS Vertical/Horizontal scroll Scrollbar

    I have to be able to detect when the user makes a scrolling up/down and left/right of my front VI during execution. Please, what are the options to achieve this?

  • probook 4540 network controller s

    Hello I am using windows 7 pro. and I have these problem 1. network controller PCI\VEN_1814 & DEV_3290 & SUBSYS_18EC103C & REV_00PCI\VEN_1814 & DEV_3290 & SUBSYS_18EC103CPCI\VEN_1814 & DEV_3290 & CC_028000PCI\VEN_1814 & DEV_3290 & CC_0280 2. bluetoot

  • Bug Mode Ultra endurance

    I was in mode ultra endurance and it disabled as usual, but he's stuck somewhere between ultra endurance mode and normal mode... now my phone just keeps restarting... What should I do?

  • How can I make Borland of Installshield Express Free Edition works with Windows 7

    I updated my operating system from Windows XP to Windows 7.  Now I have problems creating an installer using InstallShield Express Borland Free edition.  Y at - there another program I can use, or can I get a updated program InstallShield which will