How can mc_instance listen for MouseEvent?

hello;
my_mc_instance.addEventListener( MouseEvent.MOUSE_DOWN ,
a_function ) ;
I do not understand why my_mc_instance even knows what a
mouseevent is; for instance, I have to know what a "knock on the
door" is before I can listen for it;
movieclips DO NOT inherit from: Mouse or MouseEvent or even
Event;
movieclips inherit from:
MovieClip --> Sprite --> DisplayObjectContainer -->
InteractiveObject --> DisplayObject --> EventDispatcher
--> Object
so how do they even know what a MouseEvent is?
it would seem to me that trying to add a mouseevent listener
to my_mc_instance would never fire since movieclips do not inherit
any mouse-related stuff;
furthermore, according to MovieClip.as, MovieClip class
already has methods that are apparently firing for the mouseevents:
ActionScript Code:
function onMouseDown():Void;
function onMouseMove():Void;
function onMouseUp():Void;
function onPress():Void;
function onRelease():Void;
function onReleaseOutside():Void;
function onRollOut():Void;
function onRollOver():Void; ...
which makes me wonder why it is even necessary to add
mouse-related listeners to an mc;
any thoughts?
thanks
dsdsdsdsd

Hey,
The reason movie clips dispatch mouse events is because movie
clips inherit from InteractiveObject. All InteractiveObjects
dispatch mouse events, so naturally, movie clips dispatch mouse
events.
For an object to be able to dispatch events, it doesn't have
to inherit from the specific event class (MouseEvent class), just
another class that dispatches those events (InteractiveObject).
The script you included contains methods from AS2. You can't
use them in AS3, so the only way to trigger anything with the mouse
is to add event listeners.

Similar Messages

  • How Can I listen to the line-in on my T400?

    When I am at my desk, I've always had my satellite radio plugged into the line-in on my computer so that I can listen to it through the same speakers.  With my new T400, I have the radio's output plugged into the line-in on the Advanced Dock.  I know that it's getting a signal because if I record with Microsoft Sound Recorder, it records the radio.  
    How can I listen live to the signal coming into the line-in?

    You can thank Microsoft for this one.  They disabled the pass-through ability in Vista. Apparently too many people complained about feedback issues when trying to use webcams or VOIP programs and didn't know to mute the Line-In on the mixer.  It took me forever to find how to correct it.
    The following will enable the input sliders in your playback devices so audio pass through works without having to run through an application like it worked in XP. Remember, always backup your Registry just in case. I had to create new Keys for filter and SpeakerHp but yours may already be there
    1) Open regedit (Start->Run, type regedit)
    2) Navigate to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE1031*8}\0000\Settings\filter\SpeakerHp\
    3) Create a new Binary Value
    4) Give it the name EnableInputMonitor
    5) Set it's value to 01
    6) Restart your machine
    7) Open your Playback Devices (right click on volume control icon in system tray, select Playback Devices)
    8) Open the Speakers/Headphones
    9) Go to the levels tab
    10) Unmute the input monitor
    T500 - P8600 2.4Ghz Core 2 Duo, Modded - 4GB Patriot DDR3 and 320GB Caviar Black 7200rpm drive with Ati HD3650 and Catalyst 9.6 modded drivers - Vista Business 32bit stripped down to bare bones with VM's from Ubuntu to Win7RC1 64-bit.

  • I would like to create a playlist of some of my voicememos to hear on my iphone5. I have no problem creating the list and can listen on playlist on computer but not when i sync to my phone. How can I listen to voicememos in a playlist on my iPhone?

    I would like to create a playlist of some of my voicememos to hear on my iphone5. I have no problem creating the list and can listen on playlist on computer but not when i sync to my phone. How can I listen to voicememos in a playlist on my iPhone?

    Hi czigrand,
    Thanks for visiting Apple Support Communities.
    Currently, you can gift dollar amounts or individual items (EG. songs) on the iTunes Store. See this article for more information:
    In the iTunes Store, you can gift a dollar amount or specific music, movies, TV shows, or apps from your iPhone, iPod touch, iPad, Mac, or PC. Follow these steps to send a gift from the iTunes Store.
    iTunes: Sending iTunes Gifts
    http://support.apple.com/kb/HT2736
    Best Regards,
    Jeremy

  • How can you listen to music and play a game at the same time?

    How can you listen to music and play a game at the same time?
    I am playing music, by starting the Crash Baandicoot Nitro Kart 3D game it shuts off the music playing. Is there a way around this?
    It seems like this should be possible.
    Message was edited by: RuthlessVengeance
    Message was edited by: RuthlessVengeance

    Select the music play list you want to listen to and start it playing. Go back to the home screen and start the app you want to use, music will stop. Press the home button two time quickly and it will bring up a simple control for controling the music. This works for me with all of the apps I have purchased including games. Just a note you can pull up the same music control if the iPod is a sleep and locked by pressing the button three times quickly.
    Mike

  • How can you listen to music without headphones?

    How can you listen to music without headphones?

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • How can I listen to a sound file on Internet?

    How can I listen to a sound file? On Internet

    You need to download other browsers from the App Store. Use the App Store app And search for browsers you'll find a bunch of them. Download one that will do what you want. Once it's downloaded tap on the app icon to start the app.

  • How can I listen radio on my ipad

    how can I listen radio on my ipad

    Pandora Radio, iHeart Radio, TuneIn Radio.... Check out the App Store for radio apps.

  • How can I listen to Israeli internet radio stations on iMac ?

    How can I listen to Israeli Hebrew radio stations on an iMac. ? specfically : a7.org (Hebrew) or Reshet Bet or Kol Chai ?
    thanks        GFI777

    GFI777 wrote:
    - how can I contact the site ?
    That kind of thing is always somewhere on the page.  For that page there is this link:
    http://www.israelnationalnews.com/More/ActivePage.aspx/Contact

  • How can I listen to webinar where flash is required.

    How can I listen to a webinar where flash is required on my iPad 3?

    Adobe has not made a version of Flash for the iPad.
    Kappy explains why. https://discussions.apple.com/message/19446567#19446567
    5 Flash Player Alternatives http://www.techshout.com/features/2011/01/flash-player-for-ipad-apps/
    Top 4 browsers supports flash player on iPad and iPhone
    http://mashtips.com/flash-player-ios/
     Cheers, Tom

  • My computer crashed necessitating re-install of op sys and all programs including iTunes. At the iTunes store when I click a song in my library get error message "can't find, do you want to search?" What's happening? How can I listen to my library on this

    My computer crashed necessitating re-install of operating sys and all programs including iTunes. When I click on a song in my library I get an error message "can't find this song, want to search?" What gives? How can I listen to songs in my library on this computer now?

    It is working now. I no longer get the message about the item not being available in the US and I can access the store.

  • If I imported a CD into my iTunes library from one computer how can I listen to it from another computer?

    If I imported a CD into my iTunes library from one computer how can I listen to it from another computer?  I imported music from a CD into my compter at work and when I got home and went to my iTunes account none of the songs were in my library.  I also noticed that on my Work computer there were a couple songs that I had to click on the little 'cloud' icon before I could listen to them (these were not songs I imported they were songs that were already in my library).  Not sure if this makes semse...help.

    jamie171 wrote:
    My question is since I have imported them into my iTunes library from one computer why can't I access them from my iTunes library from another computer that I have authorized to access whats in my library?  Is there no way to import songs only once into the library and then access them from all my authorized computers?
    Only if you have iTunes Match or of the computers are on the same local network.

  • How can I listen to music from iphone 4s via apple tv whilst doing a phone call at the same time?

    How can I listen to music from iphone 4s via apple tv while doing a phone call at the same time?
    When I take a call on the iphone, iphone stops streaming the music to apple tv until I finished the call.
    thx!
    Claus
    PS: did ask the same question to apple hotline in germany. Answer: we don´t know... funny

    Welcome to the Apple Community.
    As far as I know you can't, which sort of makes sense, it seems logical to pause whatever you are doing while you take a phone call, which after all is the primary function of a phone.

  • I bought iPad air. How can I download for free the app : iPhoto, iMovie, Pages, Numbers and Keynote?

    I bought iPad air. How can I download for free the app : iPhoto, iMovie, Pages, Numbers and Keynote?

    Before you can download free apps:
    1. Make sure you are using IOS 7 (ignore)
    2. Make sure your iPad is registered in My Support Profile.
    https://supportprofile.apple.com/
    3. Try downloading again; it should be free.
    If you need serial number, it's here:
    Settings>General>About

  • How can I do for a row of a query be data provider for a variable?

    Hi friends, I have a problem !
    How can I do for a row of a query be data provider for a variable?
    I need that a value of variable be stored when the user select a row in a query. At the BPS we can do this configuring the variable selector in WIB, and in a WAB how I can do this ?
    Best regards,
    Gustavo Liberado

    In this case when I press the key to call other forms I need to wait for the response in the secondary form and then process the result.That is exactly what a "modal JDialog" (or JOptionPane) are used for.
    Try it. Create a short demo program. All you need is a JFrame with a single button to show the modal dialog. All you modal dialog needs is a single button to close the dialog. After you show the modal dialog add a System.out.println(...) statement in your code and you will see that it is not executed until the dialog is closed.
    Then once you understand the basics you add the code to your real program.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • How can I check for VSearch trojan?

    how can I check for VSearch trojan? And then remove it if found?

    Helpful Links Regarding Malware Problems
    If you are having an immediate problem with ads popping up see The Safe Mac » Adware Removal Guide, AdwareMedic, or Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support.
    Open Safari, select Preferences from the Safari menu. Click on Extensions icon in the toolbar. Disable all Extensions. If this stops your problem, then re-enable them one by one until the problem returns. Now remove that extension as it is causing the problem.

Maybe you are looking for

  • K9N Platinum issues

    I just bought an MSI K9N platinum mainboard with an AMD Athlon X2 4200+ cpu and Corsair Twin2X2048-5400C paired memory set. At first the bios would instantly crash but I solved that problem by by setting the voltage to 1.9v and manually setting the t

  • How can I get my HP desk jet 3054 to AirPrint with my iPad? It does not recognize any printer

    Bought new HP DESKJET 3054 printer, it air prints with my MacBook pro but not my iPad. It reads "no printers found" when I want to print. Can I get some help with this one ?  The iPad works on same wifi as printer but does not find printer. However i

  • RACF Standard connector "LookupField Target File" parameter

    Hi! I'm configuring RACF Standard connector (Release 9.0.4.12). and im not an expert in RACF so i need some specification regarding the file used as parameter "LookupField Target File" in the " Scheduled Tasks for Lookup Field Synchronization". In ot

  • How can I capture phone numbers of incoming calls?

    I want to capture the phone numbers of incoming calls. There seems to be know way to even copy and paste them. I know the must be a simple solution, what is it?

  • OSB callout libraries

    We are using API from REST/JAXB libraries in our Java callout code. Are there options other than the following Putting in server's classpath or $Domain_DIr\lib We have a callout jar that we wanted to add classes from the libraries and re-package The