How to add a second function to a bearing

I have 3 buttons on stage, I need to add sound to each of them, as they are renewed, how I have them code?

RD

baby_mc.buttonMode = true;

baby_mc.addEventListener (MouseEvent.ROLL_OVER, buttonOver);

function buttonOver(e:MouseEvent):void

{

baby_mc.gotoAndPlay ("Over");

}

treasureChestFull_mc.buttonMode = true;

treasureChestFull_mc.addEventListener (MouseEvent.ROLL_OVER, chestOver);

function chestOver(e:MouseEvent):void

{

treasureChestFull_mc.gotoAndPlay ("over");

}

pirate_mc.buttonMode = true;

pirate_mc.addEventListener (MouseEvent.ROLL_OVER, pirateOver);

function pirateOver(e:MouseEvent):void

{

pirate_mc.gotoAndPlay ("Over");

}

cat_mc.buttonMode = true;

cat_mc.addEventListener (MouseEvent.ROLL_OVER, catOver);

cat_mc.addEventListener (MouseEvent.ROLL_OUT, Marie);

function catOver(e:MouseEvent):void

{

cat_mc.gotoAndPlay ("Over");

}

function catOut(e:MouseEvent):void

{

cat_mc.gotoAndPlay ("out");

}

assign your classes of sounds (for example, Sound1Class, Sound2Class and Sound3Class) and use them in your code:

var s:Sound;

baby_mc.buttonMode = true;

baby_mc.addEventListener (MouseEvent.ROLL_OVER, buttonOver);

function buttonOver(e:MouseEvent):void

{

s = new Sound1Class();

s.Play ();

baby_mc.gotoAndPlay ("Over");

}

treasureChestFull_mc.buttonMode = true;

treasureChestFull_mc.addEventListener (MouseEvent.ROLL_OVER, chestOver);

function chestOver(e:MouseEvent):void

{

s = new Sound2Class();

s.Play ();

treasureChestFull_mc.gotoAndPlay ("over");

}

pirate_mc.buttonMode = true;

pirate_mc.addEventListener (MouseEvent.ROLL_OVER, pirateOver);

function pirateOver(e:MouseEvent):void

{

pirate_mc.gotoAndPlay ("Over");

}

cat_mc.buttonMode = true;

cat_mc.addEventListener (MouseEvent.ROLL_OVER, catOver);

cat_mc.addEventListener (MouseEvent.ROLL_OUT, Marie);

function catOver(e:MouseEvent):void

{

s = new Sound3Class();

s.Play ();

cat_mc.gotoAndPlay ("Over");

}

function catOut(e:MouseEvent):void

{

cat_mc.gotoAndPlay ("out");

}

Tags: Adobe Animate

Similar Questions

  • How to add a second connection of the user with windows 8

    How to add a second connection of the user with windows 8

    Go to the Control Panel, then click on change the Type of account in respect of the accounts of users and parental control.  Beneath the box with user accounts, there should be a link that says add a user account.  Click on that and follow the instructions to set up another user.

  • How to add a second e-mail from an address of bigpond account in Thunderbird?

    I scoured my Mozilla Thunderbird's emails. My first email address ending by... bigpond.com and my second e-mail account is a bigpond address too. How can I add a second e-mail from an address of bigpond account in Thunderbird? No easy solution?

    My guess based on the error message would be that they don't offer POP e-mail, and you must have created the new account as IMAP.

    When you look at the original, working the account server settings indicate IMAP?

    If Yes to delete the new account a recreate using IMAP instead of pop.

  • Qosmio F20: How to add a second HDD

    Hi all, my first post, so be nice!

    I recently bought a new Qosmio F20 with unique 60 gig HD. I realize now after a month, I need much more space, it will add a second 120 GIG HD. My question is, is this easy to do? How can I do? Is there a couple of screws to undo and just pop in? Also is there a certain type of HD necessary?

    Sorry for the questions of basic but this is my first laptop.

    Thanks in advance.

    Hello

    As far as I know that it is not possible to use two hard disks on F notebook series as on G series, delivered with two hard drives. In my opinion that the best solution is to use external USB connected HDD. On this way, you can use notebook HARD drive 2.5 in aluminum case.

    Google a bit and you will find many of them with a different ability. I use a 60 GB external HDD back up all my data.

    Good bye

  • How to add a second monitor to my HP - Pavilion 500

    I am trying to add a second monitor to my desktop HP Pavilion 500 (model No. 500-189) and met with many problems. At the back of my PC there is a video output that comes with several adapters, but under a plastic cover, there is an another VGA port I have my second monitor plugged into. When I restart the computer, the loading screen appears on the screen to spare, but the lock screen then appears on the primary monitor. I went to the screen resolution setting page and discovered that the computer has not detected the second monitor at all, I pressed on detect a couple of times and he couldn't find it. If anyone knows why this is happening and how to fix it please let me know. Moreover, the second monitor I'm trying to connect to is a LG Flatron and the main monitor is a Samsung SyncMaster.

    If anyone needs my computer guru please meet demand and I'd be happy to let you know.

    Thank you!

    Hello

    To add the good advice of Anil Kumar B.:

    These should help:

    Connect the multiple monitor to your PC
    http://Windows.Microsoft.com/en-us/Windows-8/how-connect-multiple-monitors

    Do more with multiple monitors
    http://Windows.Microsoft.com/en-us/Windows-8/multiple-monitors

    Check their documentation online with the HP Support and drivers, diagnostics and ask to their
    Forums about known problems.

    Connection of monitors and TVs to your PC (Windows 8)
    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c03319404&tmp_task=useCategory&cc=us&DLC=en&lang=en&LC=en&product=5365495#N496

    HP support/troubleshooting & drivers
    http://welcome.HP.com/country/us/en/support.html

    Contact HP
    http://welcome.HP.com/country/us/en/contact_us.html

    HP forums
    http://h30434.www3.HP.com/PSG/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to add the collapsible functionality to the Spry Menu?

    Dear Adobe community,

    How to add the functionality of collapsible for the Spry Menu like the one on the White House | whitehouse.gov ?

    Load the White House Web site and minimize your browser window as observe you what happends to the menu bar when you pass a certain limit.

    This is the feature that I want to put in place and I would be happy if one of you could direct me to or share relevant information.

    Concerning

    Andreas

    This isn't a menu Spry Spry do not appear on mobile devices.

    Use any sensitive menu you like for example:

    CSS & jQuery Mobile Navigation Menu Demo

    The tutorial is here:

    CSS and jQuery Menu of Navigation Mobile reactive

  • How to add a second IP address to the external network

    I have two NETWORK cards that I use for virtual machines (an internal and an external), and virtual switches have been created for each of them. My ESX Server already has an internal IP address, how do I add a second external IP address without deleting the first? I try to create a new switch, but the menu of default gateway DNS pointing to the first switch, and I don't want to remove this info.

    Network interface cards for the use of Virtual Machines require no IP addresses, they relay the traffic using the IP address found in the virtual machine. You try to add an additional service console to be accessible through this external connection? Announcement may be a print screen of your configuration might help to understand what you do and what you hope to accomplish.

  • BlackBerry Blackberry Curve Smartphones - how to add a second alarm

    Can someone tell me how to add multiple alarms in a Blackberry curve?

    You can use the calendar for more alarms.

    The integrated application called "Alarms" only supports an alarm.

    But there is that a 3rd party called BBSmart alarms Pro Application that takes in charge several alarms.

  • How to add a second hard drive of a laptop computer equipped with 2 bays for HARD drives.

    I noticed a few messages on the forums who have asked how to install a second HDD in your laptop.

    Here is a link to a video on how to install 2nd HARD drive.

    This video will show how to install the hard disk, what parts you'll need and what models are directly related to the video.

    Enjoy!

    I hope this helps!

  • How to add a second page to an existing to Manage contract

    Hello

    I need help. I have an existing formatted and structured with the fields of the sign and this Agreement who do not, and I need to add a second page to this agreement of existing formatting? Is this possible?

    Hi bryanm81164379 ,

    We inform you on the document is downloaded into the environment Adobe sign, it is not possible to make changes in the Document, you can only edit the fields in the form.

    You need to make the changes outside the environment Adobe sign documents and once done download the document folder in environment Adobe sign to place fields.

    Kind regards
    Nicos

  • How to add a second database connection

    Hello

    I added a new database connection. Then, I want to create tables business components but I do not see the schema of the database connection newly added in the drop-down list schema.


    Is there something else to do to be able to add a second connection to the base?

    Thank you

    JDev 11.1.1.6

    DB connections are strongly coupled with modules of the application. The best way would be to create a new project template and use this second model to access the database. Then, you use each application as application root module modules so that each gets its own connection.

    If you need to have these two dbs data in a table or query, you must use a link db or synonym to access data from ad of your DB connections.

    Timo

  • How to add a second monitor system

    I have a desktop HP Pavilion a6430f with a computer card Nvidia Geforce 6150 SE Video.  I want to add a second monitor.  I spoke with the Staples tech guy and he told me that because of the configuration of the motherboard on this system, I can not add a second video card, I need to replace the existing with a double monitor Cardinal card... is this true?  True or not, please tell me the correct map to newegg\where ever.  I don't play games, I'm a developer and must keep costs down.  Thank you.

    Yes it looks like everything you are looking for. 300W min, 512 MB, and dual display capable (as long as the monitors are video standard and the other is DVI or HDMI.) Good to go

  • How to add provider-specific functionality

    Hi all

    I build my lab VSAN and I try to create policies to define a rule of VSANS, but I couldn't see and any node failure or anything else (if I use "Rule based on labels" or not?), I read the other document and drag and find the document set "vendor-specific capabilities" and could see above setting...

    I want to ask where I could add provider-specific functionality?

    Thank you!!

    Wyld

    Hi wyldkao,

    Please try the steps below to create the virtual machine storage strategy.

    * Go to the "Home" in the customer Web page

    * Choose "VM storage strategy.

    * Choose 'create a new VM storage strategy.

    * Give the policy a name > click Next twice and you you'd find in a page to choose VSAN as provider of VASA

    Doc of VMware for the same thing.

    http://pubs.VMware.com/vSphere-55/index.jsp#com.VMware.vSphere.storage.doc/GUID-9A3650CE-36AA-459F-BC9F-D6D6DAAA9EB9.html

  • How to add a second hard drive Ubuntu Server, that runs on vmware workstation 9

    Hello

    I am running vmware workstation on windows 9 8, and I installed Ubuntu 12.10 as a virtual machine on my SSD. I installed a second hard drive in the machine and use the "Add a HDD" feature on vmware workstation to add and pre-allocate space. The problem is that the drive does not appear in Ubuntu. I have checked/Media and / dev, I expected to see something like /sda *. It is a procedural step, I missed it, please help!

    Do I have to mount the drive in a special way? How can I check if it is properly attached?

    Thank you!

    What you said so far, it's like adding a second physical drive to a physical computer and the operating system cannot access until it was partitioned and formatted, and then it can be mounted.  To do the same thing in a VM!

  • How to add a second iPhone number to account for help a separate activity for both phones?

    All,

    My wife and I share the same apple id account. How do I add additional phone number, so we can separate the activity such as a phone log and imessage?

    We all have two iPhone 6s.

    Thank you...

    mac2jayb wrote:

    All,

    My wife and I share the same apple id account. How do I add additional phone number, so we can separate the activity such as a phone log and imessage?

    We all have two iPhone 6s.

    Thank you...

    share the same for imessage or facetime apple ID is how you separate, is not by adding an additional phone number.

    You can use the family sharing the music and applications

Maybe you are looking for

  • Recommend Blu - Ray burning software

    Hi all I can find a BLu - Ray burner, but the software that allows you to burn BLu - Ray still seems a bit sketchy. One below looks good, but many say that you must purchase additional software for blu - ray burning. I have toast, but an older versio

  • Satellite NB550D-109 - recovery partition

    You just bought a NB550D-109.Pretty happy with it, but I have a few questions so.Is there a reason the recovery partition labled data, is half the size of the drive? This partition can be resized to give more storage without compromising the Recovery

  • Blue and dotted on Tecra series lines!

    I own a Toshiba Tecra laptop, and I recently got virus through music download.I was using my laptop this afternoon when it froze all of a sudden, in the image of the screen by turning slightly pink. I rebooted, but the Vista windows startup screen lo

  • SW3 + Samsung S7

    The evening So I spent the afternoon together, trying to get my new SW3 to work with my Samsung S7 Edge. Watch thin Bluetooth pairs. However any application that needs to use/talking on the phone all right here; Usually, I get an error "Try again on

  • HPLDA972771545

    HCL TABLET ME