External Interface and Mouse Clicks

I'm new to writing ActionScript.
I am working in .NET (C#) environment using
AxShockwaveFlashObjects.
I am simply trying to react to a mouse click on the Flash
ActiveX Control.
I have inserted the code in a layer only used for script:
import flash.external.ExternalInterface;
var mouseListener:Object = new Object();
var boolMouseDown:Boolean = false;
mouseListener.onMouseDown = function ()
boolMouseDown = true;
mouseListener.onMouseUp = function()
if (boolMouseDown)
ExternalInterface.call("MouseClicked", "NavigateToURL", "
http://www.adobe.com");
boolMouseDown = false;
Mouse.addListener(mouseListener);
I get the MouseClick event in my C# code. The problem is that
I get TWO of the same event ??
Can someone tell me why or how I should be doing this to get
only one event.
Thanks,
Steve

Take a look at java.awt.event.MouseAdapter, which implements interfaces MouseListener, MouseMotionListener, MouseWheelListener and EventListener.
For sample codes on how to use these classes, read through the posts on the Swing forum and you'll find plenty.
If you have a more specific question, feel free to post back.
db

Similar Messages

  • Recording keystrokes and mouse clicks?

    Greetings,
    I need to be able to make scripts/macros by recording keystrokes and mouse clicks with location.
    Is this possible with Automator?
    Does anyone know of a way program to do this?
    It seems so simple.
    Thanks

    Keyboard shortcuts were often missed.  For example, I tried this sequence many times. 
    0: (setup:  text editor is scrolled to first line and cursor is at the beginning of the first line)
    1: Click on text editor window to focus it.
    2: press SHIFT-DownArrow to move cursor down one line and select the first line
    3: press CMD-X to cut the line.
    Automator never would capture those key strokes. 
    But today I has a break through.  This sequence does work:
    0: (setup:  text editor is scrolled to bottom of the file and the cursor is placed below the last line.)
    1: Click on text editor window to focus it.
    2: press SHIFT-UpArror to move cursor up one line and select the last line.
    3: press CMD-X to cut the line.
    about 70% of the time this did get recorded correctly (I did maybe 3 recordings and one failed to select).  Once it got recorded correctly it worked reliably. 
    So it seems to be able to capture some sequences but not others.  Both sequences work very reliably when I type them but automator can only capture the last sequence. 
    Thanks for the suggestions.  This tool is better than nothing but not anything I would recommend.

  • External keyboard and mouse not working in closed clamshell mode

    Hi - can someone help with this strange issue.  Yesterday in closed clamshall everything was working fine. Today I cannot use my external keyboard and mouse.  Note the external monitor does show the screen (after the blue flicker etc), but keyboard and mouse is just not detected.
    Using Mac OS X (10.7.5).  Tried fiddling the "mirror" settings etc in the display preferences but nothing seems to help.  Really annoying....please help

    don't worry - figured it out !

  • Mouse over and Mouse Click function

    Hi,
    I have to add a mouse over event and mouse click event in my rectangles that I draw while taking the values from an input file. Now since I am taking rectangle height and width from the input text file as well I also want to take a text value to be shown while moving a mouse over a particular rectangle from my input file. Also when he clicks on that rectangle the height and width of that particular rectangle only should be displayed (re-adjusted).
    Like suppose my input file has 3 fields:-
    Height   Width  Test_To_Show
    10          23         Hello
    20          44         ByeNow When my paint component draws these 2 rectangles and a user moves his mouse over the rectangle he should see text message attached to it:- Like for first row 10, 23 he should see "Hello". In this case when he clicks on this rectangle the picture should read just to show only 10 and 20 as height and width. Now the problem is I am confused where to add the mouse and mouse click event function.
    Some of my code looks like this in paintcomponent method:-
            for(int i=0; i<myobject.size(); i++){
                Coloring fc = myobject.get(i);
                GradientPaint gpi = new GradientPaint(0, 0,c.getColor() , 0, 20, Color.white, true);
                g2d.setPaint(gpi);
                g2d.drawRect(fc.value1, 29, fc.mywidth, 83);
                g2d.fillRect(fc.value1, 29, fc.mywidth, 83);
                                                }Where should I attach the mouse event to g2d object / fc / myobject ? I am not sure since I am using mouseover function for the first time.
    Thanks

    I am planning to add these 2 in my paint component method
                fc.addMouseMotionListener(this);
                fc.addMouseListener(this);and then create 2 functions like this :-
          public void mouseEntered(MouseEvent e) {
                  //I will be reading from a file and then pass the string that I want to show as text while mouse over
                   String s = // takes value from the inpuf file.
                      fc.setText(s);
    public void mouseClicked(MouseEvent e) {
                 //same way reading from the file ... Not sure how I will do this one
                 }Would it be the correct way to do it ? I am doing mouse over functions for the first time so donno much about there usage.
    Thanks

  • Need to use external keyboard and mouse

    i need to use .. the external USB keyboard and mouse.. for ... my macboook pro...
    can any one help me...

    well my kbd and mus is wroking well but i am trying to use external kbd and mouse so it is more convince for me.. .. but when i join my external usb kbd and mouse it is not working .. even it is detected....
    that's why i have ask for help
    and this macbook pro is the one of  the best i have ever.. in my life.. i love it so much ..... <3

  • Lost keypresses and mouse clicks:  Hardware problem?

    I recently bought an Intel MBP, and I've been noticing strange behaviors with regard to keypresses and mouse (touchpad) clicks getting lost sometimes. The problems I'm having are hard to reproduce intentionally, but I can hear the keypresses and mouse button clicks when I do them, yet nothing happens. While it's possible, that I sometimes am hitting the wrong key, I have been paying closer attention lately to this problem, and of course, the mouse button kinda hard to hit incorrectly. Here are some examples of weird things I encounter:
    If I click in a text field in Safari, sometimes the first keypress (and only the first) will get lost.
    Sometimes, the first keypress I type right after clicking gets lost. For instance, just now, I noticed a typo in the above sentence, so I clicked on the character and hit the Delete key. The cursor was in the right place, but the delete didn't happen. I had to press the key again.
    Sometimes, even when the window for sure has focus and the pointer is squarely pointing to a link, the first click on the link won't take. I have to click it again. Since Safari doesn't have adequate feedback for when you click something, that can get particularly frustrating. Similar things happen with buttons in applications or on the title bar.
    If I'm using an X11 app, and I copy/paste with the clipboard, the touchpad won't respond to movement for 2 or 3 seconds afterward. This is particularly visible with "nedit". I don't think this is an "ignore accidental touchpad input" issue, because this only happens with clipboard actions; other keys don't have this effect. I haven't noticed this with native apps.
    However, I have noticed in X11 and native apps, sometimes, Ctrl/Cmd-C and Ctrl/Cmd-V will be ignored. They're never ignored if I selected the text using the keyboard (shift+arrows), but if I select the text with the mouse and then use the shortcut to copy, the copy/paste sometimes doesn't happen.
    I have noticed that if I am more deliberate about clicks (make sure to hold the button down longer), the probability of losing the event SEEMS to be reduced, but not eliminated. Is there a debounce circuit involved that's causing me trouble?
    This kind of loss of input is unusual to me. I have a number of Windows and Linux PCs, and I've never experienced this sort of thing. I've also used a few Macs at school before I got this one and didn't notice anything weird.
    Can anyone shed some light on this for me? It would seem odd that I should have to modify my keyboard/mouse using behavior when switching to the Mac. If the problem is hardware, how can I prove it? (Perhaps I could boot Knoppix from a CD and mess around a bit.) If the problem is software, is this a case of MacOS trying to second-guess user input?
    Thanks!

    Theosib,
    Apple regularly monitors these boards, but you may never see a response from Apple directly. Assume this is a user to user forum. If you are having a problem with the computer and need a response from Apple call 1-800-APLCARE and speak to customer relations at that office if the technician is not able to satisfy your needs.
    Your problem while not unheard of, is more uncommon than the boards may make you believe.
    Remember, Spotlight is constantly indexing. If your hard drive is overfull, it may take longer for Spotlight to index, thus cause a multitasking delay. If you have many Dashboard widgets, they may all be trying to access the net for updates at once, and again, a delay might happen. I've written a FAQ* about several other factors which may affect Mac OS X speed, which could in theory also affect keyboard input:
    http://www.macmaps.com/Macosxspeed.html
    And of course, you should always check Apple menu -> System Preferences -> Keyboard and Mouse to make sure your input settings are the ones most comfortable for you when using the keyboard. It is possible a repeat rate could cause a delay.
    Edit: I attempted to answer another of your questions here recently with an update:
    http://discussions.apple.com/click.jspa?searchID=-1&messageID=3988468
    Please take a look and see if it answers your question.
    * Links to my FAQs may give me some compensation.

  • NSView subclass and mouse clicks

    I wrote a relatively simple program. It's got a single visual component on the window, an NSView subclass with drawing delegated out to another class called Arrow. Anyway, it uses a timer to trigger calls to drawRect which in turn "animates" a layer. I have a 100x100 layer and a velocity & position which get updated each time through depending on how much "real" time has passed. As the layer bounces around the screen, the animation seems smooth and everything looks good. If I start clicking in the window, however, things get wonky. The animation stutters (probably expected) and the position sometimes gets set back to the origin (0,0, bottom left corner of screen). I wonder if there's something I can do to stop mouse clicks from affecting the view, I have no set up anything to use the mouse clicks AT ALL so I don't really know how they can affect anything in the code I wrote. If this isn't enough info to answer the question, I'll post the xcode project.

    The end result is going to be a very simple 2d game with maybe 8-10 things on the screen moving around at any one time. My next step is to try out openGL but using these CALayers seemed a lot simpler. However, since you say any event will block, I expect that will happen to opengl as well. I'll dig some more in the examples. It seems I followed the pattern from the crash landing demo (although I'm doing it on the mac itself, not iphone/simulator) to set up the rendering.
    When you suggest using core animation, are you talking about just telling it the start/end position and the speed, and letting it handle everything in between? I don't think that will work for my case because eventually I will have to handle mouse/keyboard events to alter the movement in real-time. Am I missing something?
    Thanks again for your help.

  • External Interface and Apple OS X Security Updates since 28 July 2010

    Ever since the OS X and Safari updates from 28 July onward, we have been unable to send data from Flash player to Javascript and out to Unity 3D.  From the alert() statements I have made, it appears as if the communication is being blocked at the Flash level.  In other words, the browser is either no longer accepting the external interface calls from Flash, or Flash is blocking them internally.  Calls from the browser to Flash are still functional.
    The Flash version number is 10.1.82.76 on both old (non updated machines) and newly updated (doesn't work).  Our application works on Windows fine.  On OS X systems that have not had the updates, it also works fine.
    We purchased a new iMac tonight to test and the communication works fine:
    Mac OS X 10.6.3
    Safari 4.0.5 (6531.22.7)
    On another machine the system worked fine a week ago:
    Mac OS X 10.6.4
    Safari 5.0 (6533.16)
    After the update to the following, it does not work:
    Mac OS X 10.6.4
    Safari 5.0.1 (6533.17.8)
    Anyone experiencing anything like this?  Anyone experiencing ANY trouble with Flash and those updates?
    Any and all information will help.

    A number of folks have posted similar crashing-related reports with that same system.
    http://www.macworld.com/article/2062783/cures-for-a-panicking-mid-2010-macbook-p ro.html
    You may wish to contact Apple support.

  • How do I adjust the system sounds(keyboard and mouse click) in the audio for a software simulation?

    Mouse clicks and keyboard strokes very loud in software simulation, but voice is low. I am using Captivate 7

    Indeed, I would increase the volume of the voice-over. There is a keystroke sound effect within the C:/Program Files/Adobe/Captivate 7/Gallery/Sound Effects folder, but I'm not sure if that one is directly related to the sound effect used by default.

  • Can I use a blue tooth external keyboard and mouse with iphone 5?

    I would like to use an blue tooth external keyboard &amp; mouse with my iPhone 5. Is this possible?  If so, is there software and or a certain keyboard &amp; mouse I need to purchase?

    mouse no support at all
    keyboard yes support for all bluetooth keyboards from windows bluetooth keyboards to mac keyboards to small bluetooth keyboards for phones and tablets
    not extra software required

  • AutoSubmit and mouse clicks.

    There seems to be a usability problem when using the autoSubmit feature in ADF Faces. Whenever the user enters a new value in an autoSubmit field and then clicks on some other action component (e.g. a CommandButton, CommandLink, a selectInputText icon, etc.), the autoSubmit for the modified field occurs and the appropriate backing bean is invoked. However, the action component event is not then fired and the user basically has to click again to get the desired action. This behavior is very different when they don't first modify an autoSubmit field where the action event is fired on the first click.
    While I can understand why this is physically happening, our application users see this as a bug and want it fixed. Has anyone found a solution to this or reported it as a bug to Oracle?
    I tried searching for a solution and couldn't find anything useful. Bug I do seem to remember something I thought was in the adf-faces-config about passing click or first click, but now I cannot find it.
    Thoughts or ideas?

    Hi jdrogers,
    I feel your pain about the focus "jumping" back to the ppr-event object.
    I might have a solution for you to try.
    I did the following (after a lot af javscript debugging the alert way).
    Here is what i did:
    unziped Core.js from the file
    adf-faces-impl.jar
    put it in the following directory in my project:
    \public_html\META-INF\adf\jsLibs
    changed line
    2075 to
    _pprEventElement=null;//window.document.activeElement;
    Notice the difference in javacript code for "gecko" an IE.
    It now works for me.
    Could you (and everybody with the same problem) try this and tell me of any side-effect you might notice.
    To Oracle: is this a way of fixing this problem??? Does it cause any other problems??
    regards
    Johnny

  • External keyboard and mouse not recognized after waking from sleep

    This started happening all of a sudden. It was working fine before that. When I disconnect the power cable, keyboard, and then connect them back, its not recognized. To make it recognize the keyboard and mouse, I have to logout and login or restart the laptop. I looked at this related post, but the PRAM reset fix did not work for me : http://forums.macrumors.com/showthread.php?t=870482
    Any idea how to fix it?
    OS version: 10.9.2
    MacBook Pro 13-inch Mid 2012
    Processor 2.9 GHz Intrel Core i7
    Memory 16GB 1600 MHz DDR3

    I have a similar problem on our G3 iBook with Panther. Most of the keys don't work, and of the four or five that do, they print only gibberish.
    For a while I had control of the "C" key, and I was able to start from the Installation CD-ROM. I ran Disk Utility. It found and repaired a whole bunch of permissions and reported no problem with the hard disk. But I still cannot use the keys, and since then I've lost the use of the "C" also.
    Because I cannot use the keyboard, I cannot type in my administrator's password, and for that reason I cannot use System Preferences to start from the Installation CD-ROM. I did not see the Hardware Test on the CD-ROM, but it sounds interesting.
    Any ideas on how to get back to the CD-ROM when my keyboard doesn't work?

  • Spontaneous scrolling and mouse clicks

    Not sure if this is a hardware problem or an OS or software problem, (or even one problem) but here goes. So far these problems have occurred in Word, Xcel and AOL as well as Finder.
    1. When working on a Word or Excel doc., spontaneously my window scrolls to the right so the left margin is obscured. I scroll manually back, but it does immediately back to the left. Sometimes a restart alleviates the problem temporarily. Sometimes I can work fine the entire session with no occurrence of the problem.
    2. In Excel, I can be working along fine, when suddenly spontaneous paragraph returns appear in my spreadsheet.
    3. In AOL, in the mailbox and AOL-address book windows, I can't stay scrolled vertically to where I want to be. The window bounces back to the top or bottom of the list. My mailbox is often pretty full and deleting old mail helps the problem. But my address book isn't that large and I should be able to scroll up and down.
    Also sometimes AOL will open messages from the mailbox without my clicking on them, and sometimes sends messages before I'm ready.
    Today, while I was having this problem I force-quit AOL. Without waiting for me to press enter or click the mouse, Finder force quit every application that was open.
    I've rebooted, repaired permissions and used TechTool Deluxe, and everything reports OK. But the problems persist.
    Powermac G5 dual intel   Mac OS X (10.4.8)   Apple optical USB Mouse

    Take a look at java.awt.event.MouseAdapter, which implements interfaces MouseListener, MouseMotionListener, MouseWheelListener and EventListener.
    For sample codes on how to use these classes, read through the posts on the Swing forum and you'll find plenty.
    If you have a more specific question, feel free to post back.
    db

  • HT201364 after converting to mavericks I cannot download any updates through app store and mouse click on download buttons does not respond, please assist

    Aftr converting to Mavericks could not able to update/download applications through spp store and have to force quit app store as the mouse does not click the X button

    Do you get any error messages?
    Try resetting the App Store.
    Reset       Learned from Old Toad
    Try deleting the com.apple.appstore.plist.
    Quit the application.
    Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder.  Select Preferences/com.apple.appstore.plist. Move the .plist to your desktop.
    Open the application and test. If it works okay, delete the plist from the desktop.
    If the application is the same, return the .plist to where you got it from, overwriting the newer one.
    Thanks to leonie for some information contained in this.
    You might need to redo the View settings after an update.
    App Store support. There is troubleshooting and a contact link.
    Support

  • Trackpad and Mouse click problem!! PLEASE HELP!

    I have been having this weird problem which is having to click several times on something of it to work. Mostly I have the problem with Safari and sibelius 6.0 which I work with.It doesn't click and its frustrating.I bet its not the trackpad as I happen to have a magic mouse and it's the same with that too.I have to click several times on for example "Close" the tab button for it to work.
    PLEASE HELP!

    Kirstiee, login to another User account and test it in there.
    sahba99, you would need to drag the whole preference folder to the Desktop and reboot. If it works, you know it's a preference file in that folder. Keep dragging a bunch back at a time and reboot (or log out and back in) until you narrow it down to the corrupt file. It's kind of like troubleshooting an extension conflict back in the pre-OS X days.
    Dave M.
    MacOSG v.2.0 coming April 1, 2010! No fooling! Check it out!
     MacOSG: An Apple User Group  iTunes: MacOSG Podcast  Follow us on Twitter: MacOSG

Maybe you are looking for

  • Visual Voicemail Problems

    Back when we were able to download the visual voicemail on our phones, I followed the steps it said, which including restoring my phone. I did that but I had the problem where people would leave me voicemails and it would not show up. The only way I

  • Excise invoice print preview.

    Hi..Gurus, How we can see the print preview of the excise invoice. What the settings that are needed? regards, jyothi.

  • What's wrong with Safari? (everything..?)

    I have lots of issues with Safari in Leopard. Half of the tme, I can't access a website I could enter 10 minutes ago. (this happens way too much, the blue load meter just hangs somewhere in the middle) And let's say 50% of my downloads are corrupted.

  • How can I burn an mpeg onto a DVD without having to use IDVD or IMovie?

    So I've got a few jpg's and mpeg's that I would like to burn for PC friends, but the only way I can figure out how to get these onto a CD or DVD is by using IDVD or IMovie with my IMac. Is there a way around this? Why doesn't a blank DVD or CD icon c

  • Panasonic Camcorder not working in iMovie 11

    Hi. I bought a new Panasonic X900M Camcorder which is supposed to work in iMovie 11. When I connect the camcorder to my iMac (OSX10.7.5), iPhoto pops up for some reason and then the rolling ball shows. I do a force quit. I would have thought that iMo