Drag andDrop a button

Help with moving a button without moving its position. I am
wondering if their a way where I can create a movable button
without moving its positon. I am trying to create the illusion of
moving a switch from "off" to "on", but i don't want to move the
entire button. i have the code to drag the button, but I don't want
the position to change, just a swerve affect.

You may just need to draw an animation frame-by-frame to
achieve this. Do
you have a sample of what you are trying to accomplish?
Dan Mode
--> Adobe Community Expert
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio*
http://www.tornadostream.com
*Must Read*
http://www.smithmediafusion.com/blog
"jonesdestinydesign" <[email protected]>
wrote in message
news:epvsul$s9c$[email protected]..
> Help with moving a button without moving its position. I
am wondering if
> their
> a way where I can create a movable button without moving
its positon. I
> am
> trying to create the illusion of moving a switch from
"off" to "on", but i
> don't want to move the entire button. i have the code to
drag the
> button, but
> I don't want the position to change, just a swerve
affect.
>

Similar Messages

  • How to use drag n drop button in report display

    hello friends
                             i'm displaying list report . i want one customer one time and with  diff amounts .ok first of all i'm diplaying detail customer details , if i click on one customer i have to display that cust one time and i want to get details . just like drag and drop button how to use this in normal report .
    please help me out .
    thanks & regards.
    lavanya

    Hi,
    Check this link..
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_basic.htm
    And also Check these Examples..
    BCALV_TREE_01
    BCALV_TREE_02
    BCALV_TREE_03
    BCALV_TREE_04
    BCALV_TREE_05
    BCALV_TREE_06
    BCALV_TREE_DEMO
    BCALV_TREE_DND
    BCALV_TREE_DND_MULTIPLE
    BCALV_TREE_EVENT_RECEIVER
    BCALV_TREE_EVENT_RECEIVER01
    BCALV_TREE_ITEMLAYOUT
    BCALV_TREE_MOVE_NODE_TEST
    BCALV_TREE_SIMPLE_DEMO
    BCALV_TREE_VERIFY

  • How to drag and drop button between two toolbar?

    Hi,everybody :)
    i hava a problem :
    if i have two toolbar in a frame , and there are some button in each, how can i use dnd package to drag and drop button between two toolbar,such as drag one button in a toolbar to the other toolbar ,i write some sample code ,but find some difficult to finish
    can anyone give me some example code?
    Thanks!

    hi:)
    i have done it ,but there is another problem ,after i finish drag the button and drop it into the toolbar,if my mouse across the dragged button ,it will change the color ,can i setup any mathod to disappear the side_effect?
    thank u
    click open to show the other frame
    and the code is as follows:
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    public class buttondrag implements DragGestureListener, DragSourceListener,
    DropTargetListener, Transferable{
    static JFrame source = new JFrame("Source Frame");
    static JFrame target = new JFrame("Target Frame");
    static final DataFlavor[] supportedFlavors = { null };
    static {
    try {
         supportedFlavors[0] = new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType);
    catch (Exception ex) {
         ex.printStackTrace();
    } Object object; // Transferable methods.
    public Object getTransferData(DataFlavor flavor) {
    if (flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType)) return object;
    else{
    return null;
    public DataFlavor[] getTransferDataFlavors() {
         return supportedFlavors;
    public boolean isDataFlavorSupported(DataFlavor flavor) {
         return flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType);
    } // DragGestureListener method.
    public void dragGestureRecognized(DragGestureEvent ev) {
    ev.startDrag(null, this, this);
    } // DragSourceListener methods.
    public void dragDropEnd(DragSourceDropEvent ev) { }
    public void dragEnter(DragSourceDragEvent ev) { }
    public void dragExit(DragSourceEvent ev) { }
    public void dragOver(DragSourceDragEvent ev) {
         object = ev.getSource();
    public void dropActionChanged(DragSourceDragEvent ev) { } // DropTargetListener methods.
    public void dragEnter(DropTargetDragEvent ev) { }
    public void dragExit(DropTargetEvent ev) { }
    public void dragOver(DropTargetDragEvent ev) { dropTargetDrag(ev); }
    public void dropActionChanged(DropTargetDragEvent ev) { dropTargetDrag(ev); }
    void dropTargetDrag(DropTargetDragEvent ev) { ev.acceptDrag(ev.getDropAction()); }
    public void drop(DropTargetDropEvent ev) {
         ev.acceptDrop(ev.getDropAction());
         try {
         Object target = ev.getSource();
         Object source = ev.getTransferable().getTransferData(supportedFlavors[0]);
         Component component = ((DragSourceContext) source).getComponent();
         Container oldContainer = component.getParent();
         Container container = (Container) ((DropTarget) target).getComponent();
         container.add(component);
         oldContainer.validate();
         oldContainer.repaint();
         container.validate();
         container.repaint();
         catch (Exception ex) {
              ex.printStackTrace();
              ev.dropComplete(true);
    public static void main(String[] arg) {
    JButton button = new JButton("Drag this button");
    JToolBar sbar = new JToolBar();
    JToolBar dbar = new JToolBar();
    JButton open_button = new JButton("Open");
    source.getContentPane().setLayout(null);
    source.setSize(new Dimension(400, 300));
    sbar.add(button);
    sbar.setBounds(new Rectangle(0, 0, 400, 31));
    sbar.add(open_button);
    open_button.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    target.setVisible(true);
    source.getContentPane() .add(sbar);
    target.getContentPane().setLayout(null);
    target.setSize(new Dimension(400, 300));
    target.getContentPane().add(dbar);
    dbar.setBounds(new Rectangle(0, 0, 400, 31));
    dbar.add(new JButton("button1"));
    buttondrag dndListener = new buttondrag();
    DragSource dragSource = new DragSource();
    DropTarget dropTarget1 = new DropTarget(sbar, DnDConstants.ACTION_MOVE, dndListener);
    DropTarget dropTarget2 = new DropTarget(dbar, DnDConstants.ACTION_MOVE, dndListener);
    DragGestureRecognizer dragRecognizer1 = dragSource.createDefaultDragGestureRecognizer(button, DnDConstants.ACTION_MOVE, dndListener);
    source.setBounds(0, 200, 200, 200);
    target.setVisible(false);
    target.setBounds(220, 200, 200, 200);
    source.show();
    }

  • I am walking through Apples tutorial getting started with iOS development. I am at the storyboard area and can't seem to drag the cancel button to the green exit. I am not sure why the exit button doesn't except it. Is anyone else having this issue?

    I am walking through Apples tutorial getting started with iOS development. I am at the storyboard area and can't seem to drag the cancel button to the green exit. I am not sure why the exit button doesn't except it. Is anyone else having this issue? Is there a work around? I have done this app twice and still cant get the exit to except the Cancel or Done  bar buttons

    Yes I checked it.  As far as I can see I did everything Apple said to do.  I took some screen shot so you can see how the screens are connected and what and where the code is, and what it does when I drag the cancel and done bar buttons to the exit

  • Drag function disabling button actions within movieclip

    I'm building an interactive map and i've run into a problem. The map is draggable and I have a start and stop drag function running as well as an onEnterFrame function which restricts how far you can drag the map. The map is displayed inside of a masked area. On the map is many locations which when rolled over should pop up a little dialogue box with contact info. My problem is that it only works when i've disabled the drag functions. When the drag functions are running the buttons inside the map movie clip all stop working. How can i get around this?
    Drag function:
    // Start Dragging sequence
    map_mc.onPress = function() {
        this.startDrag();
    // Stop Dragging sequence
    map_mc.onRelease = function() {
        this.stopDrag();
    onEnterFrame = function() {
    //Restricts player to stage
    if(mc_map._x <= -1400) {
      mc_map._x = -1400;
    //Restricts Bottom
    if(mc_map._y <= -400) {
      mc_map._y = -400;
    //Restricts Left
    if(mc_map._x >= 50) {
      mc_map._x = 50;
    //Restricts Top
    if(mc_map._y >= 50) {
      mc_map._y = 50;
    Sample button function:
    //Distributors
    santafespringsDI_btn.onRelease = function() {
    distributorLabels_mc.gotoAndStop(11);
    distributorLabels_mc._x = _root._xmouse + 10;
    distributorLabels_mc._y = _root._xmouse - 80;
    santafespringsDI_btn.onRollOver = function() {
    distributorLabels_mc.gotoAndStop(11);
    distributorLabels_mc._x = _root._xmouse + 10;
    distributorLabels_mc._y = _root._xmouse - 80;
    close_btn.onRelease = function() {
    distributorLabels_mc.gotoAndStop(1);

    I got it working, but i managed to break it again. I think this is why i was having difficulty with your suggestions earlier. I added a bit more to my code and broke it.
    I have a movie clip full of captions that i assign to each location. the button will make the movie clip jump to a certain frame revealing the appropriate caption for the appropriate location and then on rollout go back to the first frame of the movie clip to hide it again. Adding this functionality in stopped the dragging and I'm wondering why it did and how i get around it?
    The button code i added to activate the caption movie clip was this:
    btn.onRollOver = function() {
        captions_mc.gotoAndStop(11);
        captions_mc._x = _root._xmouse + 10;
        captions_mc._y = _root._xmouse - 80;
    btn.onRollOut = function() {
        captions_mc.gotoAndStop(1);

  • Rotate dragged shape on button click

    Hi guys,
    I need help here. I want to do a drawing application where user can resize and rotate a shape. I have created a shape which I can drag around but how to make it rotate upon clicking on button?? Let say when I select the shape and click on 'rotate' button my shape will be rotate by 90 degree. After that the rotated shape can still be drag. Any help would be appreciated.

    Hi Darryl.Burke,
    Thanks for your reply, yes I use AffineTransform methods to rotate the shape. Is there any different with other rotation method?? Ok when I use setToRotation, the shape indeed rotate to the correct position but when I click the shape return back to its original and other weird things happen. Below is the code. Can you please point out the part that I done it wrong please. Thanks.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.util.Vector;
    import javax.swing.border.CompoundBorder;
    import java.io.*;
    public class RotateShape
         private static void createAndShowGUI() {
            //Create and set up the window.
           JFrame.setDefaultLookAndFeelDecorated(true);      
           Viewer frame = new Viewer();
           frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           frame.setVisible(true);
        public static void main(String[] args)
             javax.swing.SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                   createAndShowGUI();
    class Viewer extends JFrame implements ActionListener
         JMenuBar menuBar;
         drawRect buildDesign;
        public Viewer()
           Toolkit kit = Toolkit.getDefaultToolkit();
            Dimension screenSize = kit.getScreenSize();
            int screenHeight = screenSize.height;
            int screenWidth = screenSize.width;
            // center frame in screen
              setSize(700, 600);
              setLocation(screenWidth / 4, screenHeight / 4);
              setResizable(false);
            buildDesign = new drawRect();
            buildDesign.setBorder(BorderFactory.createEmptyBorder(0, 2, 3, 3));
            JTabbedPane tabbed = new JTabbedPane();
            tabbed.addTab("Design", buildDesign);
            //tabbed.addTab("Viewer", buildViewer());
            tabbed.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6),
                                                tabbed.getBorder()));
            //------------------------End of Tabbed Pane----------------------------------------------------//
          JPanel pane = new JPanel();
          Button rectButton = new Button("Rect");
          rectButton.addActionListener(this);
          pane.add(rectButton);
          Button deleteButton = new Button("Delete");
          deleteButton.addActionListener(this);
          pane.add(deleteButton);
          Button rotateButton = new Button("Rotate");
          rotateButton.addActionListener(this);
          pane.add(rotateButton);
          JScrollPane scroller = new JScrollPane(pane);
          scroller.setOpaque(false);
          scroller.getViewport().setOpaque(false);
          scroller.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6),
                                                  scroller.getBorder()));
               //------------------------End of Build Item list----------------------------------------------//
          JPanel content = new JPanel(new BorderLayout());
          content.setOpaque(false);
          content.add(tabbed, BorderLayout.CENTER);
          content.add(scroller, BorderLayout.WEST);
          add (content, BorderLayout.CENTER);
          //------------------------End of add content----------------------------------------------//
              public void actionPerformed(ActionEvent evt) {
               // Respond to a command from one of the window's menu.
          String command = evt.getActionCommand();
          if (command.equals("Rect"))
             buildDesign.addShape(new RectShape());
          else if (command.equals("Delete"))
             buildDesign.delete();
          else if (command.equals("Rotate"))
             buildDesign.rotate();
    class drawRect extends JPanel implements ActionListener, MouseListener, MouseMotionListener
             Image offScreenCanvas = null;   // off-screen image used for double buffering
                 Graphics offScreenGraphics;     // graphics context for drawing to offScreenCanvas
                 Vector shapes = new Vector();   // holds a list of the shapes that are displayed on the canvas
                 Color currentColor = Color.black; // current color; when a shape is created, this is its color
                 float alpha;
            drawRect() {
            // Constructor: set background color to white set up listeners to respond to mouse actions
          setBackground(Color.white);
          addMouseListener(this);
          addMouseMotionListener(this);
       synchronized public void paintComponent(Graphics g) {
            Graphics2D g2 = (Graphics2D) g;
            // In the paint method, everything is drawn to an off-screen canvas, and then
            // that canvas is copied onto the screen.
          g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
          g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
          makeOffScreenCanvas();
          g2.drawImage(offScreenCanvas,0,0,this); 
          AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OUT,alpha);
              g2.setComposite(composite);
          g2.setColor(Color.GRAY);
          drawGrid(g, 20); 
       public void update(Graphics g) {
            // Update method is called when canvas is to be redrawn.
            // Just call the paint method.
          super.paintComponent(g);
       void makeOffScreenCanvas() {
             // Erase the off-screen canvas and redraw all the shapes in the list.
             // (First, if canvas has not yet been created, then create it.)
          if (offScreenCanvas == null) {
             offScreenCanvas = createImage(getSize().width,getSize().height);
             offScreenGraphics = offScreenCanvas.getGraphics();
          offScreenGraphics.setColor(getBackground());
          offScreenGraphics.fillRect(0,0,getSize().width,getSize().height);
          int top = shapes.size();
          for (int i = 0; i < top; i++) {
             Shape s = (Shape)shapes.elementAt(i);
             s.draw(offScreenGraphics);
            private void drawGrid(Graphics g, int gridSpace) {
          Insets insets = getInsets();
          int firstX = insets.left;
          int firstY = insets.top;
          int lastX = getWidth() - insets.right;
          int lastY = getHeight() - insets.bottom;
          //Draw vertical lines.
          int x = firstX;
          while (x < lastX) {
            g.drawLine(x, firstY, x, lastY);
            x += gridSpace;
          //Draw horizontal lines.
          int y = firstY;
          while (y < lastY) {
            g.drawLine(firstX, y, lastX, y);
            y += gridSpace;
        public void actionPerformed(ActionEvent evt)
         synchronized void addShape(Shape shape) {
              // Add the shape to the canvas, and set its size/position and color.
              // The shape is added at the top-left corner, with size 50-by-30.
              // Then redraw the canvas to show the newly added shape.
          shape.setColor(Color.red);
          shape.setColor(currentColor);
           shape.reshape(3,3,70,10);
          shapes.addElement(shape);
          repaint();
         void clear() {
             // remove all shapes
           shapes.setSize(0);
           repaint();
        void delete() {
             // remove selected shapes
                  shapes.removeElement(selectedShape);
                   repaint();
       void rotate() {     
                     //shapes.addElement(selectedShape);
                  selectedShape.setToRotate(true);
                  //shapes.removeElement(selectedShape);
                   repaint();
       Shape selectedShape = null;
       Shape shapeBeingDragged = null;  // This is null unless a shape is being dragged.
                                        // A non-null value is used as a signal that dragging
                                        // is in progress, as well as indicating which shape
                                        // is being dragged.
       int prevDragX;  // During dragging, these record the x and y coordinates of the
       int prevDragY;  //    previous position of the mouse.
        Shape clickedShape(int x, int y) {
             // Find the frontmost shape at coordinates (x,y); return null if there is none.
          for ( int i = shapes.size() - 1; i >= 0; i-- ) {  // check shapes from front to back
             Shape s = (Shape)shapes.elementAt(i);
             if (s.containsPoint(x,y))
                  s.tickSelected(true);
                  selectedShape = s;
                return s;
                else
                s.tickSelected(false);
                repaint();
          return null;
       synchronized public void mousePressed(MouseEvent evt) {
             // User has pressed the mouse.  Find the shape that the user has clicked on, if
             // any.  If there is a shape at the position when the mouse was clicked, then
             // start dragging it.  If the user was holding down the shift key, then bring
             // the dragged shape to the front, in front of all the other shapes.
          int x = evt.getX();  // x-coordinate of point where mouse was clicked
          int y = evt.getY();  // y-coordinate of point                                  
             shapeBeingDragged = clickedShape(x,y);
             if (shapeBeingDragged != null) {
                prevDragX = x;
                prevDragY = y;
                if (evt.isShiftDown()) {                 // Bring the shape to the front by moving it to
                   shapes.removeElement(shapeBeingDragged);  //       the end of the list of shapes.
                   shapes.addElement(shapeBeingDragged);
                   repaint();  // repaint canvas to show shape in front of other shapes
       synchronized public void mouseDragged(MouseEvent evt) {
              // User has moved the mouse.  Move the dragged shape by the same amount.
          int x = evt.getX();
          int y = evt.getY();
          if (shapeBeingDragged != null) {
             shapeBeingDragged.moveBy(x - prevDragX, y - prevDragY);
             prevDragX = x;
             prevDragY = y;
             repaint();      // redraw canvas to show shape in new position
       synchronized public void mouseReleased(MouseEvent evt) {
              // User has released the mouse.  Move the dragged shape, then set
              // shapeBeingDragged to null to indicate that dragging is over.
              // If the shape lies completely outside the canvas, remove it
              // from the list of shapes (since there is no way to ever move
              // it back onscreen).
          int x = evt.getX();
          int y = evt.getY();
          if (shapeBeingDragged != null) {
             shapeBeingDragged.moveBy(x - prevDragX, y - prevDragY);
             if ( shapeBeingDragged.left >= getSize().width || shapeBeingDragged.top >= getSize().height ||
                     shapeBeingDragged.left + shapeBeingDragged.width < 0 ||
                     shapeBeingDragged.top + shapeBeingDragged.height < 0 ) {  // shape is off-screen
                shapes.removeElement(shapeBeingDragged);  // remove shape from list of shapes
             shapeBeingDragged = null;
             repaint();
       public void mouseEntered(MouseEvent evt) { }   // Other methods required for MouseListener and
       public void mouseExited(MouseEvent evt) { }    //              MouseMotionListener interfaces.
       public void mouseMoved(MouseEvent evt) { }
       public void mouseClicked(MouseEvent evt) { }
       abstract class Shape implements Serializable{
          // A class representing shapes that can be displayed on a ShapeCanvas.
          // The subclasses of this class represent particular types of shapes.
          // When a shape is first constucted, it has height and width zero
          // and a default color of white.
       int left, top;      // Position of top left corner of rectangle that bounds this shape.
       int width, height;  // Size of the bounding rectangle.
       Color color = Color.white;  // Color of this shape.
       boolean isSelected;
       boolean isRotate;
       AffineTransform t;
       AffineTransform origTransform;
       void reshape(int left, int top, int width, int height) {
             // Set the position and size of this shape.
          this.left = left;
          this.top = top;
          this.width = width;
          this.height = height;
       void moveTo(int x, int y) {
              // Move upper left corner to the point (x,y)
          this.left = x;
          this.top = y;
       void moveBy(int dx, int dy) {
              // Move the shape by dx pixels horizontally and dy pixels veritcally
              // (by changing the position of the top-left corner of the shape).
          left += dx;
          top += dy;
       void setColor(Color color) {
              // Set the color of this shape
          this.color = color;
       void tickSelected (boolean draw) {
                 // If true, a red outline is drawn around this shape.
             isSelected = draw;
       void setToRotate (boolean draw) {
                 // If true, the shape will rotate 90 deg
             isRotate = draw;
       boolean containsPoint(int x, int y) {
             // Check whether the shape contains the point (x,y).
             // By default, this just checks whether (x,y) is inside the
             // rectangle that bounds the shape.  This method should be
             // overridden by a subclass if the default behaviour is not
             // appropriate for the subclass.
          if (x >= left && x < left+width && y >= top && y < top+height)
             return true;
          else
                      return false;
       abstract void draw(Graphics g); 
             // Draw the shape in the graphics context g.
             // This must be overriden in any concrete subclass.
         }  // end of class Shape
    class RectShape extends Shape {
          // This class represents rectangle shapes.
       void draw(Graphics g) {
            Graphics2D g2 = (Graphics2D) g;
            Rectangle2D wall = new Rectangle2D.Double(left,top,width,height);
            Rectangle2D border = new Rectangle2D.Double(left-2,top-2,width+3,height+3);
            origTransform = g2.getTransform();
            if ((isRotate) && (isSelected))
                   t = new AffineTransform();
                      t.setToRotation ((Math.toRadians (90)),(left+width/2) , (top+height/2) );
                      g2.transform(t);
                      g2.setColor(color);
                   g2.fill(wall);
                   g2.setColor(Color.red);
                    g2.draw(border);
                    g2.setTransform( origTransform );
                    return;
            else
                 g2.setColor(color);
              g2.fill(wall);
            if ((isSelected)&& !(isRotate))
                         g2.setColor(Color.red);
                         g2.draw(border);
                              else
                                   g2.setColor(Color.black);
                                   g2.draw(wall);
    }

  • Problem drag buttons on bottom toolbar in IB

    I add a toolbar in the bottom view by IB. But I can not drag UIBarItem or button on the toolbar. The button bounced back and did not appeared on the toolbar. It also happened for Navigation Bar. Anything wrong?

    Thanks for the thorough answers to my questions, Charlie.
    CharlieCL wrote:
    I set the toolbar in the view selection from unspecified to toolbar. There is no
    button on the toolbar.
    I think you've been trying to add a real toolbar object by asking IB to display a simulated toolbar at the bottom of your view.
    When you select your content view in IB, open the Attributes Inspector and expand the "Simulated User Interface Elements" panel, you have the choice of adding placeholders to your view. These can be very useful when the view controller's edit window doesn't display a bar which will be visible at run time.
    For example, if you create a nav controller in your code, its nav bar will normally be visible at the top of every controlled view--i.e. the view of each controller on the stack--at runtime. But you won't see that bar in the xib file belonging to each of those controllers. That's when you might want to add a "simulated nav bar" to the edit window. The placeholder keeps you from accidentally putting some of your view content where it will be covered by the bar, and lets you see how the screen will look at runtime.
    Since a simulated bar never causes a real bar to be created at runtime, IB won't let you add controls to that bar.
    So the solution to your question is to always drag a bar object from the IB Library when you intend to specify creation of a real bar at runtime. You shouldn't have any problem adding controls to a bar you obtain from the Library (as you confirmed in the answer to question 4).
    \- Ray

  • ADF Button components: How to disable drag and drop [SOLVED]

    Hi everyone
    I need to develop an application which allows not the user to drag and drop button components. I've converted every single af:commandbutton to h:commandbutton, to prevent this behaviour, but a huge lot of other problems arose from this "solution". I'm using JDeveloper 10.1.3.3.0.4157, and I'm a beginner, so please be patient with me.
    Thanks in advance.

    Maybe I've drifted off-topic with this, but I found the way to achieve this. The only limitation is that the change must be done on the client's computer. The drag and drop feature can be disabled by going to the about:config page in Firefox, and setting nglayout.enable_drag_images to false. It can also be done in a more "portable" way by creating a user.js script in the profile folder and setting it from there. Thank you all for stopping by and reading.

  • Buttons within a dragged object

    I have a map movie clip in a swf that can be panned using
    startDrag/stopDrag. Within the map are buttons but the buttons
    don't work, (even after it has been dragging has been stopped).
    When I remove the dragging script the button work fine.
    This is my drag script; "map" is the movie clip that is being
    dragged which has the buttons in it:
    on (press) {
    startDrag(_root.map);
    on (release) {
    stopDrag();
    }

    if you define a mouse handler for a parent movieclip, the
    mouse events will be intercepted by that parent and no child
    movieclip or button with detect any mouse event. to remedy, use a
    loop and hitTest for the parent or the child.

  • To drag a button

    I'm trying to write an applet with a frame and a button in it.
    But I can't drag correctly the button because when I click on it, it trembles and become two buttons!!!
    The following code is simple:
    import java.awt.Graphics;
    import java.awt.event.*;
    import java.awt.*;
    import java.applet.*;
    public class DragButton extends Applet
         Frame F = new Frame("DragButton window");
    Button B1 = new Button("click here");
         int X;
         int Y;
         public void init()
              F.setSize(400,200);
    F.setLocation(100,100);
    F.add(B1);
              B1.setBounds(100,100,80,40);
              MouseListenerClass M1 = new MouseListenerClass();
              B1.addMouseMotionListener(M1);
    F.setVisible(true);
         private class MouseListenerClass extends MouseMotionAdapter
              public void mouseMoved(MouseEvent E)
                   X=E.getX();
                   Y=E.getY();
                   B1.setBounds(X,Y,80,40);
    It compiles successfully.
    I'm new at java, please tell me where I'm in trouble with the style
    Thanks in advance!
    Max

    Sorry the correct code is:
    import java.awt.Graphics;
    import java.awt.event.*;
    import java.awt.*;
    import java.applet.*;
    public class DragButton extends Applet
    Frame F = new Frame("DragButton window");
    Button B1 = new Button("click here");
    int X;
    int Y;
    public void init()
    F.setSize(400,200);
    F.setLocation(100,100);
    F.add(B1);
    B1.setBounds(100,100,80,40);
    MouseListenerClass M1 = new MouseListenerClass();
    B1.addMouseMotionListener(M1);
    F.setVisible(true);
    private class MouseListenerClass extends MouseMotionAdapter
    public void mouseDragged(MouseEvent E)
    X=E.getX();
    Y=E.getY();
    B1.setBounds(X,Y,80,40);
    With "mouseMoved" method it works fine.

  • Submit Button In Web Dynpro Layout not working.

    Hi All,
             I have integrated an adobe form in my web dynpro application.According to my requirement the view of screen should change when the user clicks on submit button.So I have given the submit button as one of the UI element in my WD object along with the form.But when I click on the submit button the functionality doesnot work.
    The same submit button works when there is no adobe form integrated in my WD application.
    Please let me know what needs tyo be done so make that submit button work.
    Thanks and Regards,
    Sarang

    Sarang,
    Lets go step-by-step.
    1. Create two views in your applications lets say the names are View1 and View2.
    2. Goto Diagram View of the Window in under Windows node in your Web Dynpro Explorer in NWDS.
    3. Create Inbound and Outbound plugs for View1 namely inbView1 and outView1
    4. Repeat the same for View2. So names will be inbView2 and outView2.
    5. Create a navigational link between the Vies by creating a link from outView1 plug to inView2 plug.
    6. Goto Layout tab for the View1. This is where you have embedded the Interactive form element.
    7. Set the displayType property to native.
    8. Under Events there will be onSubmit method, craete a new method called navigateToView2 and click Go. This will take you where you can implement your logic.
    9. Fire the outbound plug of View1. See following code snippet:-
    public void onActiong navigateToView2(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActiongotoView2(ServerEvent)
        wdThis.wdFirePlugOutView1();
        //@@end
    10. Edit the Interactive form, it should open Adove LiveCycle Designer.
    11. Drag-drop Submit button from WD Native library ontot the form.
    11. Don't modify anything and check if you see below code snippet in the Editor.
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - 705.20051114114126.253659.250577 - SubmitToSAP.xfo
                          ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
                          // END OF DO NOT MODIFY
    12. Now whenever you click submit button on the form, what it does is that it makes call to WD framework and the onSubmit action handler is called where you have written the code to navigate to View2.
    Chintan

  • Simple Button Action Help

    Hi
    I am new to flash and having a bit of trouble. All I would
    like to do is be able to create a button and have that button
    navigate to a frame.
    What I am doing now is:
    Insert - New Symbol - Button and name the button (ex: about)
    Go through the up/over/down/hit steps and return to scene 1
    I then drag the about button onto the stage
    I give the about button the instance name of about_btn
    In the action layer, I enter the following code:
    stop();
    _root.about_btn.onRelease = function(){
    gotoAndStop("about");
    "about" being the keyframe I would like to go to
    When I test the button, I get error 1120: "Access of
    undefined property onrelease".
    I am working on adobe flash cs3 on a pc. I know this is a
    very simple issue and any help would be greatly appreciated.
    Thank you.

    quote:
    Originally posted by:
    db11
    When I test the button, I get error 1120: "Access of
    undefined property onrelease".
    AS3 is case sensitive. You must have mistyped onrelease
    instead of onRelease

  • Simple Button Help

    Hi
    I am new to flash and having a bit of trouble. All I would
    like to do is be able to create a button and have that button
    navigate to a frame.
    What I am doing now is:
    Insert - New Symbol - Button and name the button (ex: about)
    Go through the up/over/down/hit steps and return to scene 1
    I then drag the about button onto the stage
    I give the about button the instance name of about_btn
    In the action layer, I enter the following code:
    stop();
    _root.about_btn.onRelease = function(){
    gotoAndStop("about");
    "about" being the keyframe I would like to go to
    When I test the button, I get error 1120: "Access of
    undefined property onrelease".
    I am working on adobe flash cs3 on a pc. I know this is a
    very simple issue and any help would be greatly appreciated.
    Thank you.

    what have you done so far? what don't you know how to do?
    where are you stuck at? need way more detail to help any
    further.

  • My UI is not the same as that shown in the Mozilla website..why? (i.e home button still on left hand side of screen and no bookmark icon)

    I was using FF 4 Beta and applied the update ... I noticed that my final version was not the same as shown on the website so I removed the beta setup file and took off all versions of FF cleaned adn restarted my laptop and then reinstalled a clean version of FF 4.. however my final* version is not the same as shown still. Is this right or do I need to do something else :(
    Examples of what is different is the home icon remains on the left hand side of the screen next to the back button and I do not have the bookmarks icons which from the website should appear on the right hand side next to the new location of the home button.

    Look you can customize it very easily.
    Press Alt+V to have the View Menu -> Select Toolbars -> Click on Customize -> Now drag the Home Button to anywhere on the toolbar and pick the Bookmarks Button from the available icons and put it in the toolbar.

  • Why can't we have "show cookies" menu be a button in the new drop down menu on FF29 ?

    I see the new Firefox 29 has a drop down menu in the upper right corner, with various shortcut symbols. One of them is "preferences", but I would like to make that to be have an even shorter shortcut to "show cookies", instead of having it buried in several clicks as in the old versions of FF.

    # Install Cookie Manager Button and restart Firefox if prompted.
    #* https://addons.mozilla.org/firefox/addon/cookie-manager-button/
    # Right-click (or Ctrl+click) an empty area of the tab bar and choose Customize.
    # Drag the Cookies button from the palette onto the menu panel on the right.

Maybe you are looking for

  • Calling a class's method from another class

    Hi, i would like to know if it's possible to call a Class's method and get it's return from another Class. This first Class doesn't extend the second. I've got a Choice on this first class and depending on what is selected, i want to draw a image on

  • PO Group/Split by Account Assignment

    Is there a possibility to split/group Purchase Orders that would be created directly from the 'Process Purchase Order' transaction? I thought of using the Group_Local_PO BADi, but it would be called only while creating Purchase Orders from the sourci

  • Unable to install Solaris 8 OE patches

    I'm trying to install the Solaris 8 recommended patch cluster on my new Blade 150. I downloaded and unzipped the patch file, dropped into single user mode, and executed the install_cluster script. After asking me if I was ready to continue to install

  • Weblogic server not starting due to connection pool error.

    Hi all, We have some issues with the network due to that, weblog server not able to create the connection pool or make physical connection with the database in the allocated time, we need to increase the timeout so that weblogic can wait and create a

  • Mail Mavericks still does not start without crashing

    I've updated Mavericks and also installed the Mail update but my mail app is still crashing, can't start it without crashing. I have 3 gmail accounts that use the mail app...everything was functioning fine before Macericks...Also if I try to go to On