My buttons will not work.  Help

error:

/ Main.as, line 181126: service does not have a body.

package

{

import flash.display.MovieClip;

import flash.events.MouseEvent;

SerializableAttribute public class Main extends MovieClip

{

public void Main()

{

oneBtn.addEventListener (MouseEvent.CLICK, moveRight);

leftBtn.addEventListener (MouseEvent.CLICK, moveLeft);

}

Add event handlers

private void moveRight(event:MouseEvent):void

its moveLeft(event:MouseEvent):void function

{

monkMc.x += 20;

monkMc.x-= - 20;

}

}

}

The error is likely referring to this line, since there is no function body, if you could help by indicating which line is 18 yourself...

private void moveRight(event:MouseEvent):void

If the way you wrote this is trying to get two functions to do the same thing it is not correct to do so.  Also the code within the function that follows will not move anything since the first line is cancelled by the second.

The right way to code event handlers would be...

Add event handlers

private void moveRight(event:MouseEvent):void

{

monkMc.x += 20;

}

its moveLeft(event:MouseEvent):void function

{

monkMc.x-= - 20;

}

Tags: Adobe Animate

Similar Questions

  • I updated Firefox on my Mac (10.6.8), and now the story is not known (that option is checked) and the back button will not work. Help?

    I updated Firefox on my Mac (10.6.8), and now the story is not known (that option is checked) and the back button will not work. Help?

    One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.

    You can also try to repair the database of places with this extension:

  • camera compact xperia z3 button will not work

    It's a good time that the camera on my Xperia Z3 compact button does not work. Probably happened after an upgrade of the system, I don't remember you.

    What is the camera button is to activate the menu bar notification drop down, clearly a software related issue.

    Diagnosis does not help either since the button works indeed although do something else.

    When fully annoied I marked all forums as I do now. No PC companion, no restoration to the initial settings please, this will just make waste you your time.

    These guys who are supposed to help are not doing their job, that's all.

    I'm even thinking that it was a feature introduced plan to avoid, see the other discussions, that the phone has taken shots, without intent to do so because of the extreme sensitivity of this button

    In settings, about phone, Diagnostics, you can test the Test buttons.  Scroll up to the test of camera button.

    Normally the camera 'clicks' twice, the first click (in the middle) button is to focus, the second click (at the bottom) is to take the picture. The second click starts the camera from any screen. In the screen diagnoses, that the icon lights up, indicating the button works, click on the second.

    If your button does not work, perhaps it is blocked or defective. If this is the case then you can take your phone to a service center for repair.

    The fact that your camera button takes the notification bar is very weird, stems from your phone and you have installed some kind of mod? If this is the case reflash your system partition through flashtool or factory reset by the CCP. Other than the only thing I can think is that your phone has a weird anomaly happens with the motherboard.

    Good luck.

  • iPhone 6: my home button is not working, help! Touch ID works well.

    My Home button stop working ALL of a SUDDEN! I drop my phone on the ground / water or whatever. It just stop working alone. Help!

    Have you ever tried troubleshooting mentioned in this article?

    The Home button is on the front of your iOS device, downstairs. If the Home button does not work, follow these steps:

    1. Press the sleep/wake button to lock your device.
    2. Wait a few seconds.
    3. Press the Home button. Your device has to wake up.

    If your device doesn't wake up, follow these steps. Test the home button after each step:

    1. Restart your device.
    2. Look for debris or dirt around the home button and clean it with a soft cloth.
    3. Remove any protective film or matter that covers the Home button.

    If the Home button is not even wake up the device, or if the switch is damaged, contact Apple technical support.

    copied from:get help with buttons and switches on your iPhone, iPad or iPod touch - Apple Support

  • I've upgraded to Windows 7 and now my laptop mouse scroll button will not work.

    I have upgraded from Windows Vista to Windows 7 on my Fujitsu Lifebook laptop.

    The mouse that is built into my computer is a tablet with a typical right button and left button - and between these 2 buttons are 2 small buttons that can scroll and down the documents and Web sites. Well, since I have upgraded from Vista to 7, this button did not work. Not on Web pages, not on Word documents, not on anything!

    Does anyone know how to fix this?

    Thank you!

    Saturday, September 4, 2010 12:53:55 + 0000, forthewin wrote:
     
    >
    >
    > I have upgraded from Windows Vista to Windows 7 on my Fujitsu Lifebook laptop.
    >
    >
    >
    > The mouse that is built into my computer is a tablet with a typical right button and left button - and between these 2 buttons are 2 small buttons that can scroll and down the documents and Web sites. Well, since I have upgraded from Vista to 7, this button did not work. Not on Web pages, not on Word documents, not on anything!
    >
    >
    >
    > Is - anyone know how to solve this?
     
     
    Check on the Fujitsu website to see if they have a Windows 7 driver
    for your touchpad. If they download and install it. If they are not,
    you're out of luck.
     
    --
    Ken Blake
     

    Ken Blake, Microsoft MVP

  • Satellite A60-106 Internet button will not work

    Hello
    I recently had my laptop repaired as it kept turning off (an accumulation of dust internally). However, since returning the internet button no longer works.

    I have Windows Vista Ultimate installed but cannot find where the key turn it back on. Can someone help please I find this method of connection to the invaluable internet.

    Thank you very much, Chris

    To use this Toshiba control buttons you will need a Toshiba control utility for Vista OS.
    But I put t remember that Toshiba has released Vista drivers for this laptop series.
    That is why I don't think you'll be abele to use these buttons running the Vista operating system

  • My shift key will not work help quickly

    My shift key does not work and I do not really like that. Whenever I'm trying to do an emote it won't work as a simple smiley face now that I can do is; D, but im really D;. Help, please.

    My shift key does not work and I do not really like that. Whenever I'm trying to do an emote it won't work as a simple smiley face now that I can do is; D, but im really D;. Help, please.

    Hey Mazin48

    If you are using a desktop computer, the first thing to try is another keyboard and see if this fixes the problem

    If a laptop try a usb keyboard

    If that works for the laptop, contact the manufacturer of the laptop

    Walter, the time zone traveller

  • buttons will not work if you leave the frame back button

    I have a few simple buttons that work very well until I leave the frame, the buttons are on a go to another frame. When I come back, the buttons are dead. This is how set up listeners and managers:

    for the buttons turn screen event listeners

    detailsMovieClip_mc.tour0.addEventListener (MouseEvent.CLICK, tour0_click);

    detailsMovieClip_mc.tour0.addEventListener (MouseEvent.ROLL_OVER, tour0_over);

    detailsMovieClip_mc.tour0.addEventListener (MouseEvent.ROLL_OUT, tour0_out);

    function tour0_click(Event:MouseEvent):void

    {

    do something

    }

    function tour0_over(Event:MouseEvent):void

    {

    do something

    }

    function tour0_out(Event:MouseEvent):void

    {

    do something

    }

    no idea why this is happening?

    The most likely reason is that you are going to an image where the buttons do not exist and then return to a framework where they exist, but are not one where they have their headphones to events assigned to them.

  • Buttons do not work - help

    On my test site www.pullman.co.nz/dda/test/index I have a flash with a left menu top site. If I press the same key twice now that he goes not to the good reputation - the that is when the images button it goes to the 'images' section, but when you press it when it is already on the framework of 'images' happening again at the "intro" section Any help would be appreciated.

    D

    Replace the gotoAndPlay ("images"); with gotoAndStop ("images");

    You say that she can play, so it will go to the next section if he is already sitting on it.

  • WordPress 3.1 buttons will not work in pages

    Using FF 3.6.15 and Wordpress 3.1 I can get the java buttons to work on posts, but not on the pages. In other browsers, they work very well.

    Anyone else having this problem?

    Can you put a link where it doesn't work?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the Add-ons is the cause of the problem (switch to the DEFAULT theme: Tools > Modules > themes).

    • Makes no changes on the start safe mode window.

    See:

  • Satellite A660-149 illumination buttons will not work.

    Hello
    Until today, I had no problem with this great machine. But now, on random, the lighting buttons are simply not. I managed to make it to the light, and when I start the machine upward, they seem to work. However, when he enters the office, they are brilliant, but does does not (except for the volume buttons). I also noticed that I can't turn off my touch pad, which is a bit annoying.
    It is possible that I have to move these buttons somehow, but I don't know how...

    Please open Toshiba Assist and OPTIMIZE option, below HardwareSetup tool. Check if the settings button is enabled or disabled.

    In the worst case, you can reinstall VAP and everything should be OK again.

  • Satellite A300 - controls (ie. mute, play/pause) button will not work

    Satellite A300 controls buttons on my laptop reasonably new (ie. mute, play/pause buttons) are only half lit and non-responsive my ironing to.

    They use to work when I got the laptop but suddenly, they stopped. You use to be able to drag your finger across the buttons and they melted, then fade in. Now all look as if are to halfway between the gradual estrangement and are stuck there permanantly.

    Hello!

    Using Windows Vista?

    If so, you should try to reinstall the Toshiba value added Package. You can download the Toshiba site:
    http://EU.computers.Toshiba-Europe.com-online decision-making supported Downloads & => Download drivers

    If you have downloaded the new VAP first remove the old version and restart the laptop. Then install new version and reboot once again.

    Good bye

  • PSD buttons & States not working - help?

    Hi people!

    I'm working on a website for the moment

    I used buttons PSD with bearing & Mousedown

    Before setting the links to the States everything worked well when you put the mouse on it changes the color I wanted and change to a different color when the mouse has been pressed on what was perfect HOWEVER - when I put the hyperlink on it all States seem to have removed? Anyone know why this is happening?

    Screen Shot 2015-03-22 at 11.31.00.png

    But when you preview, just like that and nothing more...

    Screen Shot 2015-03-22 at 11.32.34 (2).png

    Please check the site properties hyperlink style > content.

    Thank you

    Sanjit

  • My buttons will not work

    I wanted my buttons to be somewhat dynamic, so I did 2 symbols of film to improve.

    One of them is a symbol of a glow which impulses. I put this in the framework more and he seemed to play well.

    The other symbol of film is a pulse rings I wanted to have broadcast from the button when it is pressed, so I put as a hit. It doesn't seem to appear at all. Why is this?

    Also my low chart remains only when the key is pressed with the mouse button. I thought that Down would be more like a State down and he would stay down when you press. Are there more advanced in addition just upwards, downwards and click on the options button?

    Oh ok.

    So basically if I use these buttons to access a section of a timeline, I have to set the start of the party jumped to trigger my Blip (behind the button) and have the graph of ButtonActive during this part of the timeline. and I use the stop() after the animation of blip to expect more orders.

    This makes a lot of sense.

    Thanks yall!

  • My ps3 controller will work on my pc it DOWNLOAD the driver it dose but not working help me please thank you

    my work on my pc ps3 controller it download the driver for it but dose will not work help me please thank you cannot get to work on all the games I play just the key bored

    Visit this link:

    http://www.howtogeek.com/HOWTO/45610/how-to-use-your-PS-3-controllers-as-a-joystick-for-your-Windows-PC/

    http://ps3controllerwindows7.com

Maybe you are looking for

  • How to find if a given number is integer?

    Hello How can I find out if a given number (a variable after simplification holds a value) is an integer or not. ? I thought I could use mathscript isinteger () function, but it is not exist - is in error I can do without mathscript? Thank you

  • No Sound-need driver

    No Sound-need drivers for speakers i.t.works MSP201 help please.

  • convert exe to vi

    Can I convert .exe file .vi in LabVIEW... I want to know the solution to this...

  • Is there a camera for Mac utility?

    Is there a camera for Mac utility?  If so, can you give me a link?

  • Cannot log on to HP Pavilion

    For the first time in seven years, when I tried to log on my HP Pavilion (with Vista), I received the following message: "the service user profile Service has no logon.  User profile cannot be loaded.  When I entered a wrong password just to see what