Adding mouse click effect

Hello,
I am trying to create a whirpool like wave effect on a image
with a mouse click.
This following url is what I am trying to achieve with
captivate.
http://www.gautamsaha.com/bigsky/assessment.swf
The was created using the hotspot quiz type feature of
"articulate"
When you click on any part of the map with mouse, a nice
wavelike ripple shows.
When you click again on another part of the map, the same
feature shows.
I have tried hard...but I cant seem to figure out how to do
this with Captivate.
Can anyone help?

Hi again gotham1
When I say "create a widget", I'm referring to what I've seen
my fellow Adobe Community Expert Paul Dewhurst do. You can check
his stuff out by
clicking here.
Your statement regarding adding this to the gallery somewhat
confuses me, as almost any object you add appears in the gallery.
Further I'm confused with the comment regarding there being nothing
in Captivate to enable interaction with Flash things. I'm really
hopeful that you will check out Paul's stuff, as he has done many
such things.
I think your approach is what Paul uses. That is, dropping
the Flash created .SWF onto a Captivate slide as an animation.
Cheers... Rick

Similar Messages

  • CP 6 Video mode: mouse click effects, keyboard tap sounds

    CP 6 capturing Video mode
    How do I set mouse click effects and keyboard tap sounds?
    Of course these settings surely cannot be set on a per slide basis as video mode does not have slides but why I'm not able to set them on a project basis?
    thanks

    Video mode is pure video. You can change some properties of the mouse (Choose Edit, Edit Mouse Points and when selecting one of the mouse objects look in its Properties panel, Options accordion. This accordion has the small curved arrow top right that you can use to apply the changes to all mouse objects.
    I'm not sure what you mean by 'keyboard tap sounds' at all? There is no way to add an interactive object, where you would be able to click, so what is the meaning of taps in that case?
    Lilybiri

  • Different mouse clicks & speed up mouse movements?

    Hello,
    Does Adobe Captivate recognise different mouse clicks better
    to say if it can record on RMB LMB and MMB clicks different
    effects? For example I wish to record Software Simulation project
    were on different mouse clicks (RMB, LMB, MMB) would have custom
    effects like "OrangeRing" for RMB " "GreenRing" for LMB etc?
    One more question plz: I found Published movie mouse
    movements are very slow can I make it move more fast without
    editing every slide separatelly?
    Thanks
    Ton

    Hello Tony,
    Whilst Captivate does recognize different mouse clicks (in so
    much as the application will capture a right-click menu) you cannot
    specify what type of mouse effect the application will use when you
    capture.
    What you can do is change the mouse click effect post
    capture. To do this and with a just captured project open carry out
    these steps:
    1. Select the slide that has a mouse pointer where you would
    like need to show a right-click action.
    2. Choose Slide > Mouse > Properties...
    3. In the Mouse Properties dialog make sure that the option
    "show mouse click" is selected and then show either the color or
    the custom effect you would like to use to represent the
    right-click operation.
    Naturally, at the very start of your movie/project you would
    need to inform the learner that each time they see the one of the
    effect you want them to right-click. You could also include some
    audio as well which would be important if you need to adhere to
    accessibility standards.
    In regard to your second question, in most cases you will
    find that you get the best result if you adjust the mouse timing
    using the Timeline.
    That said if you own a copy of Adobe Captivate 2 you can
    change the mouse Display and Appear After settings globally via the
    Mouse Properties dialog. Personally, for mouse movement I would not
    recommend this. Anyway here are the steps to carry that out.
    1. Select any slide that has a mouse pointer present.
    2. Choose Slide > Mouse > Properties...
    3. Click the Timing tab
    4. Change the Display time and Appear After values
    5. Click the Settings button
    6. Choose the appropriate options from both Which properties
    and which slide categories
    7. Click OK.
    Note : You can also show the Mouse properties dialog by left
    clicking on mouse icon on any of the slides in the Filmstrip
    Regards,
    Mark

  • Swipe Effect through mouse click

    Hi,
    I am new to animations and trying to add few in my application.
    (1)Whenever I am navigating to different page (by a click or double click of a node ), I want to have an animation -- old page moving towards left and getting removed altogether and new page getting loaded from right hand side.
    Something like a page swipe in ios/android devices . However my application is not for touch enabled devices for now.
    Is this possible though javafx 2.x . If so , could you direct me to appropriate sample/api.
    (2) Can a click of a mouse be mapped to Gesture Events. For example - I click a link/button for navigation and application takes it as a Swipe Event and hence navigates to a different page giving swipe effect ?
    Thanks

    (1) Whenever I am navigating to different page (by a click or double click of a node ), I want to have an animation -- old page moving towards left and getting removed altogether and new page getting loaded from right hand side. Yes, see:
    http://docs.oracle.com/javafx/2/animations/basics.htm#CJAJJAGI (Transitions)
    http://docs.oracle.com/javafx/2/api/javafx/animation/package-summary.html (Animation API)
    http://www.e-zest.net/blog/sliding-in-javafx-its-all-about-clipping/ (Sliding in JavaFX)
    http://fxexperience.com/2012/03/canned-animations/ (Animation Lib)
    http://gist.github.com/1437374 (Panel Slide Effect)
    (2) Can a click of a mouse be mapped to Gesture EventsI don't think this can be done with the public API. One way to do it would be to add a filter on your layout pane which consumes the mouse click event and generates a SwipeEvent, but SwipeEvent has no constructor - so this would not work. There is an existing Jira request to create public constructors for event classes so that this kind of thing could be done. Perhaps you could make use of private impl_ apis or com.sun classes to allow this to be done with JavaFX 2.2, but I wouldn't recommend that approach.
    Also it is probably best to place separate questions in separate posts for ease of searching etc.

  • Problems using right-mouse click functionality in a Captivate added to Articulate?

    Has anyone experienced any problems using the right-mouse click functionality? It's working fine when I preview the project, or view the published Captivate SWF or HTML file, but it's not working when I insert the published Flash file into Articulate and then try it in the published Articulate. I'm using AS2 and Flash Player v10. When I try to right-click it's bringing up the Flash Settings menu you can click on. I've been into my Flash Manager and told it to always allow content from the folder my Articulate is in but that hasn't made any difference. I'm viewing the Articulate on my C drive and I have read that that can cause problems - does anyone have any ideas? If I left-click it recognises it as a click but doesn't recognise it as the correct click action, so just keeps on bringing up my failure caption and won't allow me to progress.
    Thank you!

    Hello,
    The right-click functionality in Captivate is 'in' the JS-file, that is called by the HTML-file that will open the SWF. But if you insert the SWF-file in Presenter (Articulate or Adobe) the right-click functionality will not be there, because you are not using the JS-file. BTW: this was also explained in the thread where you posted this same question before. Please, do not post the same question in 2 different threads
    Lilybiri

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • How to get  the mouse clicked positions on a movie

    I am doing a project on Objects tracking
    I am capturing the video data using webcamera and playing it using processor in JMF
    my problem is , if i click on the movie that is being played currently, i have to display the co-ordinates of the mouse clicked position.
    can anyone help me?
    Thanks in advance
    Sudha

    hello
    i have attache my coding here
    see to it
    import java.io.*;
    import java.io.IOException;
    import java.net.*;
    import java.net.URL;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.*;
    import javax.media.*;
    import javax.media.util.*;
    import javax.media.Buffer.*;
    import javax.media.format.*;
    import javax.media.Format;
    import javax.media.protocol.*;
    import javax.media.control.*;
    import javax.media.rtp.*;
    import javax.media.protocol.DataSource;
    import com.sun.media.ui.*;
    import javax.media.format.YUVFormat;
    import java.util.*;
    import java.util.Vector;
    import javax.imageio.*;
    import javax.imageio.stream.*;
    class capturing1 extends JInternalFrame implements ActionListener,MouseListener,MouseMotionListener,ControllerListener
    * The entry point of the example
    * @param args The command line arguments
         int mark_flg=0;
         int xpos=0,ypos=0;
         mdetect mde=new mdetect();
         protected boolean transitionOK;
         protected Object synchronizer;
         protected Processor processor;
         JButton mark;
         JButton track;
    capturing1(String fname)
    {     super(fname, true, true, true, true);
         getContentPane().setLayout( new BorderLayout() );
         setSize(320, 10);
         setLocation(50, 50);
         setVisible(true);
         processor = null;
    synchronizer = new Object();
    transitionOK = true;
         mark=new JButton("mark");
         track=new JButton("track");
         mark.setSize(25,25);
         track.setSize(25,25);
         mark.addActionListener(this);
         track.addActionListener(this);
         getContentPane().add("East", mark);
         //getContentPane().add("West", track);
         try {
         UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
         } catch (Exception e) {
         System.err.println("Could not initialize java.awt Metal lnf");
         Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, new Boolean(true));
         addMouseListener(this);
         addMouseMotionListener(this);
         loadAndStart(fname);
    public void loadAndStart(String fn)
    boolean status;
    status = loadFile(fn);
    if (status) status = configure();
         TrackControl tc[] = processor.getTrackControls();
         if (tc == null) {
                   System.err.println("Failed to obtain track controls from the processor.");
                   System.exit(0);
              // Search for the track control for the video track.
              TrackControl videoTrack = null;
              for (int i = 0; i < tc.length; i++) {
                   if (tc.getFormat() instanceof VideoFormat) {
                   videoTrack = tc[i];
                   break;
              if (videoTrack == null) {
                   System.err.println("The input media does not contain a video track.");
                   System.exit(0);
         try {
         Codec codec[] = {mde};
         videoTrack.setCodecChain(codec);
         } catch (UnsupportedPlugInException e) {
         System.err.println("The processor does not support effects.");
    if (status) status = realize();
    public boolean loadFile(String fn)
    boolean status;
    URL url;
         status = false;
         /*Vector v = CaptureDeviceManager.getDeviceList(new VideoFormat(
    VideoFormat.YUV));
    System.out.println(((CaptureDeviceInfo) v.get(0)).getName());
    try{
         MediaLocator ml = ((CaptureDeviceInfo) v.get(0)).getLocator();
    System.out.println(ml.toString());
         processor = Manager.createProcessor(ml);processor.addControllerListener(this);status = true;
    }catch(Exception e){
    System.err.println("Exception occured\n");
    e.printStackTrace();
         System.exit(0);
    try {
    url = new URL("file:"+
    System.getProperty("user.dir")+
    "/"+fn);
    if (url != null) {
    processor = Manager.createProcessor(url);
         processor.addControllerListener(this);
    status = true;
    } catch (NoProcessorException npe) {
    System.out.println("Unable to create a processor!");
    } catch (IOException ioe) {
    System.out.println("Unable to connect to source!");
    return status;
    public boolean configure()
    boolean status;
    status = false;
    // Put the Processor into the configured state
    processor.configure();
    if (waitFor(processor.Configured)) {               
    // Set the content descriptor to null so that the
    // processor can be used as a player
    processor.setContentDescriptor(null);
    status = true;
    } else {
    System.out.println("Unable to configure the processor!");
    return status;
    public boolean realize()
    boolean status;
    Component c;
    status = false;
    // Put the Processor into the realized state
    processor.prefetch();
    if (waitFor(processor.Prefetched)) {               
    // The Processor has been realized so the
    // components can be layed out
    c = processor.getVisualComponent();
    getContentPane().add("Center", c);
    c = processor.getControlPanelComponent();
    if (c != null)
              getContentPane().add("South", c);
    System.out.println("button added");
    // Start the Processor
              validate();System.out.println("button added");
    processor.start();
    status = true;
    } else {
    System.out.println("Unable to realize the processor!");
    return status;
    protected boolean waitFor(int state)
    // Make this block synchronized
    synchronized(synchronizer) {
    try {
    while ((processor.getState() != state) &&
    (transitionOK)) {
    synchronizer.wait();
    } catch (InterruptedException ie) {
    // Ignore it
    return transitionOK;
    public synchronized void controllerUpdate(ControllerEvent evt)
    if ( (evt instanceof ConfigureCompleteEvent) ||
    (evt instanceof RealizeCompleteEvent) ||
    (evt instanceof PrefetchCompleteEvent) ) {
    // Synchronize this block
    synchronized(synchronizer) {
    transitionOK = true;
    synchronizer.notifyAll();
    } else if (evt instanceof ResourceUnavailableEvent) {
    // Synchronize this block
    synchronized(synchronizer) {
    transitionOK = false;
    synchronizer.notifyAll();
    public void mouseMoved(MouseEvent e) {
    //saySomething("Mouse moved", e);
    public void mouseDragged(MouseEvent e) {
    saySomething("Mouse dragged", e);
    public void mousePressed(MouseEvent e) {
    //saySomething("Mouse pressed; # of clicks: "
    // + e.getClickCount(), e);
    public void mouseReleased(MouseEvent e) {
    //saySomething("Mouse released; # of clicks: "
    // + e.getClickCount(), e);
    public void mouseEntered(MouseEvent e) {
    //saySomething("Mouse entered", e);
    public void mouseExited(MouseEvent e) {
    //saySomething("Mouse exited", e);
    public void mouseClicked(MouseEvent e) {
    saySomething("Mouse clicked (# of clicks: "
    + e.getClickCount() + ")", e);
         xpos=e.getX(); ypos=e.getY();
    void saySomething(String eventDescription, MouseEvent e) {
         System.out.println("The Object is at the point "+"x ,"+e.getX()+ "y" + e.getY());
         if(mark_flg==1){
         mdetect.markObject(xpos,ypos);
         //mark_flg=0;
    public void actionPerformed(ActionEvent e)
         if(e.getSource()==track)
              System.out.println("track pressed");
              processor.start();
         if(e.getSource()==mark)
              mark_flg=1;//processor.stop();
              System.out.println("mark pressed");
    public class track extends Frame
    {     JDesktopPane desktop;
    public track(String f)
         setLayout( new BorderLayout() );
         desktop = new JDesktopPane();
         desktop.setDoubleBuffered(true);
         add("Center", desktop);
         setSize(640, 480);
         capturing1 cap1=new capturing1(f);
         desktop.add(cap1);
         setVisible(true);
    public static void main(String args[])
    new track(args[0]);
    /****************************** mdetect class**********************************************/
    class mdetect implements Effect
         //Processor processor;
    static boolean marked=true; static int mark_flg=0; int a=1;
    static int xpos=0,ypos=0;
    private Format inputFormat;
    private Format outputFormat;
    private Format[] inputFormats;
    private Format[] outputFormats;
    private int[] bwPixels;
    private byte[] bwData;
    private RGBFormat vfIn = null;
    private static int imageWidth = 0;
    private int imageHeight = 0;
    private int imageArea = 0;
    static int[] p1;
    mdetect()
    System.out.println("mdetect called");
    inputFormats = new Format[] {
    new RGBFormat(null,
    Format.NOT_SPECIFIED,
    Format.byteArray,
    Format.NOT_SPECIFIED,
                                  24,
    3, 2, 1,
    3, Format.NOT_SPECIFIED,
    Format.TRUE,
    Format.NOT_SPECIFIED)
    outputFormats = new Format[] {
    new RGBFormat(null,
    Format.NOT_SPECIFIED,
    Format.byteArray,
    Format.NOT_SPECIFIED,
                                  24,
    3, 2, 1,
    3, Format.NOT_SPECIFIED,
    Format.TRUE,
    Format.NOT_SPECIFIED)
         public Format[] getSupportedInputFormats() {
    return inputFormats;
         public Format [] getSupportedOutputFormats(Format input) {
    if (input == null) {
    return outputFormats;
    if (matches(input, inputFormats) != null) {
    return new Format[] { outputFormats[0].intersects(input) };
    } else {
    return new Format[0];
         public Format setInputFormat(Format input) {
    inputFormat = input;
         return input;
         public Format setOutputFormat(Format output) {
    if (output == null || matches(output, outputFormats) == null)
    return null;
    RGBFormat incoming = (RGBFormat) output;
    Dimension size = incoming.getSize();
    int maxDataLength = incoming.getMaxDataLength();
    int lineStride = incoming.getLineStride();
    float frameRate = incoming.getFrameRate();
    int flipped = incoming.getFlipped();
    int endian = incoming.getEndian();
    if (size == null)
    return null;
    if (maxDataLength < size.width * size.height * 3)
    maxDataLength = size.width * size.height * 3;
    if (lineStride < size.width * 3)
    lineStride = size.width * 3;
    if (flipped != Format.FALSE)
    flipped = Format.FALSE;
    outputFormat = outputFormats[0].intersects(new RGBFormat(size,
    maxDataLength,
    null,
    frameRate,
    Format.NOT_SPECIFIED,
    Format.NOT_SPECIFIED,
    Format.NOT_SPECIFIED,
    Format.NOT_SPECIFIED,
    Format.NOT_SPECIFIED,
    lineStride,
    Format.NOT_SPECIFIED,
    Format.NOT_SPECIFIED));
    return outputFormat;
    public synchronized int process(Buffer inBuffer, Buffer outBuffer) {
         int i=0;
         a++;
              //System.out.println("discard buffer"+inBuffer.isEOM());
              //System.out.println("w n h");
              //System.out.println("w"+size.width+"h"+size.height);
              //System.out.println("format"+inBuffer.getFormat());
              //System.out.println("RGB"+outImage.getRGB(3,3));
              //Graphics og = outImage.getGraphics();
              //og.drawImage(stopImage, 0, 0, size.width, size.height, null);
              vfIn = (RGBFormat) inBuffer.getFormat();
         Dimension size = vfIn.getSize();
              if(inBuffer.isEOM()==false)
              BufferToImage stopBuffer = new BufferToImage((VideoFormat) inBuffer.getFormat());
              Image stopImage = stopBuffer.createImage( inBuffer);
              BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
              if(a==6)
              PictureButton.but(stopImage);
              System.out.println("stop image called");
              //cut
    /*if(a<0)
         for(int rr=0;rr<MAXROWS;rr++)
              for(int cc=0;cc<MAXCOLS;cc++)
                   System.out.print(PixelArray[rr][cc]+" ");
         System.out.println("@");
    a=0;
         int outputDataLength = ((VideoFormat)outputFormat).getMaxDataLength();
    validateByteArraySize(outBuffer, outputDataLength);
    outBuffer.setLength(outputDataLength);
    outBuffer.setFormat(outputFormat);
    outBuffer.setFlags(inBuffer.getFlags());
         byte [] inData = (byte[]) inBuffer.getData();
    byte [] outData =(byte[]) outBuffer.getData();
         Object data = inBuffer.getData();
    int pixStrideIn = vfIn.getPixelStride();
    int lineStrideIn = vfIn.getLineStride();
         imageWidth = (vfIn.getLineStride())/3; //Divide by 3 since each pixel has 3 colours.
         imageHeight = ((vfIn.getMaxDataLength())/3)/imageWidth;
         imageArea = imageWidth*imageHeight;
    int r=0,g=0,b = 0; //Red, green and blue values.
         System.arraycopy(inData,0,outData,0,outData.length);
         bwPixels = new int[outputDataLength/3] ;
         p1=new int[outputDataLength/3];int[] p=new int[outputDataLength/3];
         for (int ip = 0; ip < inData.length; ip+=3) {
              int bw = 0;
                   r = (int) inData[ip] ;
                   g = (int) inData[ip+1] ;
                   b = (int) inData[ip+2];
    bw = (int) ((r + b + g)/ (double) 3);
              p1[ip/3]=bw;
         return BUFFER_PROCESSED_OK;
         public String getName() {
    return "Motion Detection Codec";
    public void open() {
    public void close() {
    public void reset() {
         public Format matches(Format in, Format outs[]) {
         for (int i = 0; i < outs.length; i++) {
         if (in.matches(outs[i]))
              return outs[i];
         return null;
    public Object getControl(String controlType) {
    System.out.println(controlType);
         return null;
    public Object[] getControls() {
    return null;
    byte[] validateByteArraySize(Buffer buffer,int newSize) {
    Object objectArray=buffer.getData();
    byte[] typedArray;
    if (objectArray instanceof byte[]) {     // Has correct type and is not null
    typedArray=(byte[])objectArray;
    if (typedArray.length >= newSize ) { // Has sufficient capacity
    return typedArray;
    byte[] tempArray=new byte[newSize]; // Reallocate array
    System.arraycopy(typedArray,0,tempArray,0,typedArray.length);
    typedArray = tempArray;
    } else {
    typedArray = new byte[newSize];
    buffer.setData(typedArray);
    return typedArray;
    public static void markObject(int x,int y)
    marked=true;
    xpos=x; ypos=y;
    /* int j =0, m=0,n=0;
    int total = p1.length; int col = imageWidth; //int row = imageHeight;
    int[][] twodim = new int[total/col][col];
    System.out.println("p1 arr"+p1.length+","+twodim.length+"col"+col);
    for(j=0;j<total;j++)
    twodim[n][m] = p1[j];
    System.out.print( twodim[n][m]+" ");
    m++;
    if( m ==col)
    m=0; n++;
    System.out.println("@"+n);
    System.out.println("m"+m+"n"+n);*/
    public int markObject()
    //System.out.println("boolean mark called");
    mark_flg=1;
    return mark_flg;
    /*****************************************end of mdetect class*****************************************************/
    /*********************************** Image Icon class ****************************************************************/
    class PictureButton extends JFrame implements MouseMotionListener,MouseListener{
    static Image image;Icon icon2;JButton button2=new JButton("hi"); int[] pixels; Container content;
    public PictureButton(Image img ) {
    super("PictureButton v1.0");
    setSize(200, 200);
    setLocation(200, 200);
    Icon icon = new ImageIcon(img);
    JButton button = new JButton(icon);
         button.addMouseMotionListener(this);
         button.addMouseListener(this);
    button.addActionListener(new ActionListener( ) {
    public void actionPerformed(ActionEvent ae) {
    System.out.println("Urp!");
    content = getContentPane( );
    content.setLayout(new FlowLayout( ));
    content.add(button);
         //content.add(button2);
    public static void but(Image im) {
         image=im;
    JFrame f = new PictureButton(im );
    f.addWindowListener(new WindowAdapter( ) {
    public void windowClosing(WindowEvent we) { System.exit(0); }
    f.setVisible(true);
    public void mouseMoved(MouseEvent e) {
    //saySomething("Mouse moved", e);
    public void mouseDragged(MouseEvent e) {
    saySomething("Mouse dragged", e);
    public void mousePressed(MouseEvent e) {
    //saySomething("Mouse pressed; # of clicks: "
    // + e.getClickCount(), e);
    public void mouseReleased(MouseEvent e) {
    //saySomething("Mouse released; # of clicks: "
    // + e.getClickCount(), e);
    public void mouseEntered(MouseEvent e) {
    //saySomething("Mouse entered", e);
    public void mouseExited(MouseEvent e) {
    //saySomething("Mouse exited", e);
    public void mouseClicked(MouseEvent e) {
    saySomething("Mouse clicked (# of clicks: "
    + e.getClickCount() + ")", e);
    void saySomething(String eventDescription, MouseEvent e) {
    int w=0;int ind=0;
         System.out.println("The Object is at the point "+"x ,"+e.getX()+ "y" + e.getY());
         int[][][] imagePixels = imageIO.loadImage(image);
              final int MAXROWS = imagePixels.length;
              final int MAXCOLS = imagePixels[0].length;
              int[][] PixelArray = new int[MAXROWS][MAXCOLS];
              pixels=new int[MAXROWS*MAXCOLS];
              int cnt=0;
              int pix=0,pix1=0;
    for(int row=0; row<imagePixels.length; row++) {
    for(int col=0; col<imagePixels[0].length; col++) {
    for(int rgbo=0; rgbo<4; rgbo++) {
                   if((cnt<3)&&(rgbo<3))
    w++;
                   pix=pix+imagePixels[row][col][rgbo];
                   cnt++;
                   else
                   {cnt=0;}
    } // for rgbo
    pix1 = pix/3;
    pix = 0;
                   /*if(col<97)
                   {pix1=(byte)192;}*/
    PixelArray[row][col] = pix1;
                   System.out.print(pix1+" ");
    } // for col
                   System.out.println("@");
    } // for row
         System.out.println("pix arr"+PixelArray.length);
         for(int ww=0;ww<MAXROWS;ww++)
         for(int hh=0;hh<MAXCOLS;hh++)
         pixels[ind++]=PixelArray[ww][hh];
         image = createImage (new MemoryImageSource( MAXROWS,MAXCOLS, pixels, 0, MAXROWS));
         System.out.println(" img added");
    /********************************* end of Image Icon class**********************************************************/
    this program will capture the video n play
    if u click on the mark button processor will be stopped
    u can click on the image and get the mouse co-ordinates
    i have also got the pixel values of the current frame at which u had clicked the mark button..do some manipulation on the pixels to get ur stuff work
    hope this will help u in some way
    regards
    sudha

  • How do I set my project to advance to next slide on mouse click vs just play?

    Captivate 6 on mac running OS 10.7.5 file format in question .htm (firefox)
    I'm brand new to Captivate 6 (never used it before) I have put together a mock presentation from scratch which has a few introductory slides then a quiz. When I publish it there is a "play" button which is NOT the behavior I want.
    I watched a training video from Lynda.com and the insstructor imported a PPT file, there was a dialog box which asked the how to advance slide, there was a drop down menu and one of two options was advance "on mouse click". This is the behavior I'm looking for.
    I've scoured the internet and forums etc to find a comparable option elsewhere in Captivate 6 when creating from scratch vs importing from PPT and cannot find one anywhere. I've also read that you can insert a click box object and that that would do what I'm looking for but that doesn't work either.
    Does any such option exist and if so where/ how do I get to it/ use it. Please see attachments below. First screen shot is the first slide I get which isn't the first slide either, what's up with that? Next one is simply to show how the project just "plays" instead of advancing slide by slide. Third is my publish dialog box. Bottom line I don't want a "play" button I want the user to mouse click next, next, next etc. How do I do this?
    Thank you for any help or suggestions!

    Maybe I understand something wrongly, but thought you also wanted to know how you can make slides advance on clicking the Next button instead of having it playing on automatically? And instead of using the playbar you want to have a Previous and Next button?
    The way imported PPT with advance on Mouse click works is because there is a click box added to each slide that pauses that slide at its end. The user has to click on the slide to advance.
    A click box is an 'interactive' object: this means that you can have it pausing the slide, that the user can interact with it and trigger an action like 'Go to Next Slide'.
    You added (from what I see on the last screenshot) another interactive object, but now I'm confused: the third screenshot has a Prev and Next arrow, I think those are shapes. You do not need to add a click box on top of them (what I see on the last screenshot), they can be converted themselves into buttons. I blogged a lot about those shape buttons. Anyway, both click box and shape button can pause the slide. This is the case by default for click boxes (at the end of their duration, their timeline), for shape buttons you have to tell them to pause in the Timing accordion. In your case I certainly would choose a shape button because they can be put on a master slide, or timed for the rest of the project whereas Click boxes need to be unique on each slide, you'l have a lot of copy/paste to do then. In the Action accordion, On Success you choose the action, I think in this case you want 'Go to Next Slide' for the Next 'thing'
    As for the first screenshot, Rod explained that you cannot get rid of the play button for pdf output, but you can have a poster image instead of the blank screen. There is a folder icon in Preferences, Project, Start and End when you deselect AuotPlay.
    Here is a link to an article where I explain shape buttons:
    http://lilybiri.posterous.com/why-i-like-shape-buttons-captivate-6
    There is an on-demand webinar as well on the Adobe site which I presented, only about shape buttons.
    Lilybiri

  • Automator - How do I: Mouse Click, Move Windows, and more

    Hello,
    I am attempting to create my own Automator programs and for a while I had some that worked nicely. I have recently been tweaking my iMac so that it can "think" on its own (by automator of course) and do things for me. However, I've run across a block with Mavericks (I believe it's due to Mavericks).
    1. How can I get Automator to register a mouse click? "Watch me do" does not seem to want to work for me at all. I also would prefer if it would just be a registered mouse click, but not actually use the mouse (I know this is possible) so that if I'm doing something and it runs, it won't disturb my mouse and I can keep working.
    2. How can I register a keyboard stroke? Same as above
    3. How can I have automator move windows? I have two monitors and there are times when I may want it to move a window from one mintor to another
    The following is a list of all the things I'm attempting to accomplish at the moment (with other things when I think of them) with automator (either through applications, folder actions, or ical actions):
    1. Register a mouse click at a given area or on a given element in a safari page
    2. Register a keyboard stroke in a given program (be able to focus on a program and then do the keystroke)
    3. Move windows from one location to another
    4. Full-screen and Un-full-screen iTunes at certain times of day
    5. Download all purchased items on iTunes that aren't on the computer (sometimes iTunes doesn't download stuff if it was downloaded on my MacBook Pro first)
    6. Automatically voice read reminders (that I've set in Reminders) each day at a given time (I can use loop to repeat it to make sure I hear it all)
    I'll think of more of course, but the mouse click, keyboard stroke, and moving windows is the big thing I'm trying to figure out how to do. Can anyone help?
    Also, I am not a computer tech. I am tinkering with this because it's fun and helpful, but an answer of "just use applescript" or "just use java" will likely just give me a headache. I know that it's going to be one of those codes, but I'm hoping someone has a "base" code that can be copied and pasted that's just a standard click that I can adjust for where I need to click and what process I need to click on.
    If there is an Action Pack that includes a "Register Mouse Click" and/or "Register Keyboard Stroke", then that would work great, but the only action packs for automator I've seen that work with Mavericks is for photoshop.

    You're asking for a lot in one post.  It would be better to break your requests down a bit. 
    For example, to deal with mouse clicks, you can use the Automator Action Run Shell Script with this python script:
    import sys
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
            theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
            CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
            mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclick(posx,posy):
            mouseEvent(kCGEventLeftMouseDown, posx,posy);
            mouseEvent(kCGEventLeftMouseUp, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # Click the "Apple"
    mouseclick(25, 5);  
    # 1 second delay       
    time.sleep(1);        
    # Restore mouse position
    mousemove(int(currentpos.x),int(currentpos.y))
    It will look like this in Automator:
    To drag something (i.e. a window, a file icon) from position 40,60 to 60,300:
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
               theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
               CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
               mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclickdn(posx,posy):
               mouseEvent(kCGEventLeftMouseDown, posx,posy);
    def mouseclickup(posx,posy):
               mouseEvent(kCGEventLeftMouseUp, posx,posy);
    def mousedrag(posx,posy):
               mouseEvent(kCGEventLeftMouseDragged, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # move mouse to upper left of screen
    mouseclickdn(40, 60);
    # drag icon to new location
    mousedrag(60, 300);
    # release mouse
    mouseclickup(60, 300);
    # necessary delay
    time.sleep(1);
    # return mouse to start positon
    mouseclickdn(int(currentpos.x),int(currentpos.y));
    For keystokes in AppleScript (which can be added to Automator with the Run Applescript Action) see: http://dougscripts.com/itunes/itinfo/keycodes.php

  • How can I (neatly) control mouse click events in a multi-dimensional array?

    Hello everyone!
         I have a question regarding the use of mouse clicks events in a multi-dimensional array (or a "2D" array as we refer to them in Java and C++).
    Background
         I have an array of objects each with a corresponding mouse click event. Each object is stored at a location ranging from [0][0] to [5][8] (hence a 9 x 6 grid) and has the specific column and row number associated with it as well (i.e. tile [2][4] has a row number of 2 and a column number of 4, even though it is on the third row, fifth column). Upon each mouse click, the tile that is selected is stored in a temporary array. The array is cleared if a tile is clicked that does not share a column or row value equal to, minus or plus 1 with the currently targeted tile (i.e. clicking tile [1][1] will clear the array if there aren't any tiles stored that have the row/column number
    [0][0], [0][1], [0][2],
    [1][0], [1][1], [1][2],
    [2][0], [2][1], [2][2]
    or any contiguous column/row with another tile stored in the array, meaning that the newly clicked tile only needs to be sharing a border with one of the tiles in the temp array but not necessarily with the last tile stored).
    Question
         What is a clean, tidy way of programming this in AS3? Here are a couple portions of my code (although the mouse click event isn't finished/working correctly):
      public function tileClick(e:MouseEvent):void
       var tile:Object = e.currentTarget;
       tileSelect.push(uint(tile.currentFrameLabel));
       selectArr.push(tile);
       if (tile.select.visible == false)
        tile.select.visible = true;
       else
        tile.select.visible = false;
       for (var i:uint = 0; i < selectArr.length; i++)
        if ((tile.rowN == selectArr[i].rowN - 1) ||
         (tile.rowN == selectArr[i].rowN) ||
         (tile.rowN == selectArr[i].rowN + 1))
         if ((tile.colN == selectArr[i].colN - 1) ||
         (tile.colN == selectArr[i].colN) ||
         (tile.colN == selectArr[i].colN + 1))
          trace("jackpot!" + i);
        else
         for (var ii:uint = 0; ii < 1; ii++)
          for (var iii:uint = 0; iii < selectArr.length; iii++)
           selectArr[iii].select.visible = false;
          selectArr = [];
          trace("Err!");

    Andrei1,
         So are you saying that if I, rather than assigning a uint to the column and row number for each tile, just assigned a string to each one in the form "#_#" then I could actually just assign the "adjacent" array directly to it instead of using a generic object to hold those values? In this case, my click event would simply check the indexes, one at a time, of all tiles currently stored in my "selectArr" array against the column/row string in the currently selected tile. Am I correct so far? If I am then let's say that "selectArr" is currently holding five tile coordinates (the user has clicked on five adjacent tiles thus far) and a sixth one is being evaluated now:
    Current "selectArr" values:
           1_0
           1_1, 2_1, 3_1
                  2_2
    New tile clicked:
           1_0
           1_1, 2_1, 3_1
                  2_2
                  2_3
    Coordinate search:
           1_-1
    0_0, 1_0, 2_0, 3_0
    0_1, 1_1, 2_1, 3_1, 4_1
           1_2, 2_2, 3_2
                  2_3
         Essentially what is happening here is that the new tile is checking all four coordinates/indexes belonging to each of the five tiles stored in the "selectArr" array as it tries to find a match for one of its own (which it does for the tile at coordinate 2_2). Thus the new tile at coordinate 2_3 would be marked as valid and added to the "selectArr" array as we wait for the next tile to be clicked and validated. Is this correct?

  • Mouse clicks count!

    Hello!
    I have a JTable. I added a mouse listener to it! The problem is that I cannot count the mouse clicks correctly!
    I have:
    mouseClicked(... e){
    e.getClickCount()
    but I only get 1 click, despite the double click I made!
    Does the table mouse listener erases the preceding event and never gets to count the second click? I got the behaviour of two single clicks!
    THANKS in advance!
    Rui Vale

    ... the the milli between the events... if they are say 40 milli or less the action is a double click...if not restart the chronometer...You can use other listener to...it depends on what you want to do!
    JRG

  • Mouse clicks on shapes drawn on canvas

    I'm having some trouble adding a mouseListener to a shape I've drawn on a canvas.
    I'm drawing a circle using g.drawOval() and then filling it in with the g.fillOval().
    The thing is I want the circle to be sensitive to mouse clicks on it, I'm trying to write the classic dots and boxes game, so I can draw a line from it to the
    next circle (dot) clicked.
    Unfortunately, the circle is not picking up on the mouseClicked event, I'm pretty sure my dotActions class works because I used it on another class which extends JLabel and it works fine, that is when the label is clicked the program exits, but when I add it to the Dots class it doesn't pick up on any mouse events.
    Here is my code, any help would be appreciated, thanks.
    public class Dots extends Canvas {
    public Dots(gameBoard gb, Graphics g, int x, int y, int hspace, int vspace){
    g.drawOval(x, y, 10, 10);
    g.fillOval(x, y, 10, 10);
    dotActions da = new dotActions(this);
    addMouseListener(da);
    public class dotActions implements MouseListener{
    public void mouseClicked(MouseEvent e){
    //this is a test to see if the mouse event is picked up
    System.exit(0);
    public void mouseEntered(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    }

    Create a shape and add the listener to that as well as drawing to the screen.
    Or what I did was to save all the shapes and then test the mouse point to see if current mouse point was inside any. In my case I am using it to provide context sensitive help
    MArk
    * handle context sensitive tooltips - replaces default java
    * routine with our own which is context sensitive
    public String getToolTipText(MouseEvent e)
    Point raw_p = e.getPoint();
    //convert to our co-ords
    Point p = new Point(screenToScaledCoordsX((int) raw_p.getX()),
    screenToScaledCoordsY((int) raw_p.getY()));
    String tip = null;
    //check any tooltips to see if match found
    if (number_of_tooltips > 0)
    //check each object and get master tooltip text if inside rectangle if on
    //same page - go through all as text objects added before titles which will then be picked up
    for (int i = 0; i < number_of_tooltips; i++)
    if ((tool_tip_page[i] == last_page_id) &&
    (tool_tip_rectangle.contains(p)))
    tip = tool_tip_text[i];
    //return default or ours
    return tip;

  • Mouse clicks do not register

    Over the past few weeks for no apparent reason mouse clicks will stop working on my Mac Pro. Generally speaking, clicking will work in the dock, system menu bar and sometimes a click on a background window of another application will bring to to the front. At other times clicking anywhere has zero effect.
    The mouse moves around the screen fine otherwise. I generally use an Apple wireless trackpad but once this problem occurs it doesn't matter what input device I use - a wired mouse, my wireless Wacom tablet, etc. - the problem remains. I can tab around within an application, fill in text fields or open files using the keyboard. But even using screen share and taking control of the desktop from my laptop the problem remains: clicking of any kind does not work. So it's not the input devices or their connections.
    On occasion I will hit command-option escape and force quit all applications and restart the finder and that will work. Other times not.The system remains responsive - no spinning beachballs etc. In the end I'm forced to restart the computer and everything returns to normal.
    Whats-a-going-on? Any ideas?

    Sorry, missed that...
    My point remains the same: if your hard-wired devices are known good, then you have a intermittent problem that resides either in the OS or in hardware.  The nexts step are along the lines of reseating all the boards, running hardware tests, etc. to try to determine if it's hardware or software before re-installing the operating system.
    The other option is to take it to an Apple qualified service guy. If you do that, I'd look for a Mac Pro specialist (someone who works on pro video or audio systems, etc) since most Apple Stores are mostly for iPads, not serious hardware.
    Good luck

  • Mouse clicks occasionally stop working

    I am currently deploying a Java Swing application, and sometimes the end-user encounters an unusual problem whereby they open the application and mouse clicks have no effect. The mouse movement is still tracked fine, as buttons and menus get highlighted as expected when the mouse passes over them. I searched for information about this problem, and learned that a work-around is to click the middle mouse button. This does indeed restore the mouse click behaviour and all continues to work fine after that.
    So then I thought I might simulate a middle-button mouse click during my application start-up, in the hope of remedying the problem before any end-user actually sees it. The result is that instead of remedying the problem, I actually cause it to happen every time! The application gets into a state whereby mouse clicks are ignored, and clicking the middle-mouse button restores the mouse click behaviour.
    Has anyone else experienced this problem, and know of a way to prevent end-users from experiencing this problem? Here's some example code that demonstrates the behaviour:
    import java.awt.Robot;
    import java.awt.event.InputEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class Main
        public static void main(String[] args)
            JFrame frame = new JFrame();
            frame.getContentPane().add(new JButton("Click Me"));
            frame.pack();
            frame.setLocationRelativeTo(null);
            try
                // Simulate a middle-button mouse click
                Robot robot = new Robot();
                robot.mousePress(InputEvent.BUTTON2_MASK);
            catch (Exception e)
                e.printStackTrace();
            frame.setVisible(true);
    }Note I'm using Java 1.6.0_07. Any help with this would be much appreciated,
    Paul.

    import java.awt.Robot;
    import java.awt.event.InputEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class Main
        public static void main(String[] args)
            JFrame frame = new JFrame();
            frame.getContentPane().add(new JButton("Click Me"));
            frame.pack();
            frame.setLocationRelativeTo(null);
            try
                // Simulate a middle-button mouse click
                Robot robot = new Robot();
                robot.mousePress(InputEvent.BUTTON2_MASK);
                // Simulate a middle-button mouse click again
                robot.mousePress(InputEvent.BUTTON2_MASK);
            catch (Exception e)
                e.printStackTrace();
            frame.setVisible(true);
    }?

  • Mouse clicks not working on published air app, works fine when debugging/testing

    So I have an issue where when debugging my Air application, it runs fine and mouse clicks work and everything.  When I publish the application and install it, it plays fine but clicking does nothing.
    We have an older version which is working when we publish it and we're trying to add things in one step at a time, but I figured I'd see if anyone else has had this issue.  A bit frustrating.
    Thanks!

    FIXED!!!!
    We're using Dropbox to share files and it turns out that two people having project open at same time is a bad idea when doing final publish!  It creates conflict files and effects the final package or something of that nature.
    Glad we got that one figured out!

Maybe you are looking for