Drag drop and object rotation

Want to develop simple puzzle games (in the browser) where forms (for example, a form of puzzle piece) can be simultaneously dragged and swivels, then fell on the screen or canvas.  The game mode is to click and drag the shape or object, while simultaneously turning the piece using the arrow keys.  Is this possible in Flash?  This simple general activity of simultaneous drag and rotate, then fall, is my basic game scheduled together web site.  I'm new to Flash, but have developed Windows executables for many years.  I'm trying to decide whether to buy and learn Flash as a platform for interactive educational puzzle running games in the browser windows.

Simultaneous portion is critical, am concerned about the questions to get the focus for key downs on a polygon, or an image, or anything that would work well as a piece of the puzzle.

Thank you very much

I wasn't too sure the simultaneous drag and rotation, so I did a small sample file.  It confirms that you can do both at the same time.  Drag with the mouse and hold down the left or right arrow key to turn.

http://www.nedwebs.com/Flash/AS3_Drag_and_Rotate.swf

Tags: Adobe Animate

Similar Questions

  • Sansa clip-drag & drop shockwave object corrupts - the error of the operating system "refreshing database".

    If by mistake, you drag and drop an object flash shockwave from your local directory from the PC to the sansa clip, corrupt you the operating system of the sansa clip. When re - start the sansa clip, clip progresses by up to 70% with error message "refreshing database", but fails to start successfully. If the press-'hold' button on sansa clip, the appliance does not start. It crashes with the error message "refreshing database' but doesn't load is not the operating system.»

    It was a user error to drag - move all the MP3 files in the directory of the PC, one of whom was of type shockwave flash object file.

    Help!

    André

    Try the clip board.  This is the map of the e200 series.

  • Drag & Drop and start

    After the Fusion 8 upgrade, I noticed that I can not drag and drop between Windows7 and MacOS (10.10.5)

    MORE when I run Merge (automatic start of Windows), NOW I get a "Windows is not stopped... successfully." "whenever I start, even if operating manual.

    I did nothing else than to pay and install the upgrade of Fusion 8.1

    I'd like to go back the way it was... drag & don't drop between Windows and Mac... no error starting Windows... suggestions?

    Thought of her old post on a similar problem.

    Once the update of Fusion to the 7 8 tools VMWare had to be installed... Once installed the two drag & drop began work and error starting Windows stopped... would have been nice to know to reinstall the VMWare Tools.

  • Drag & drop and right click to stop work in Premiere Pro

    Hello!

    We use Adobe Premiere Pro in the business for a while now. Only today it began to happen that first would completely freeze on the attempt to drag and drop a file in sequence. Drag / move cursor would remain same after the release of the left mouse button and the interface user of first overall would freeze. Here is an example of what is happening: https://youtu.be/hXbBY342HLI

    It is the latest version of Premiere Pro. I tried to clean the Adobe programs and settings power off the PC completely and everything reinstalled again. It does not solve the issue.

    This problem will not occur in all the projects that I noticed. But I don't see anything in common between the projects in which what happens.

    Does anyone have a similar problem?

    Try to delete the sequence markers In/Out.

  • Hi, PDF images, drag drop and place, ready for printing

    Hi, I have a client who is a small magazine. They use PDF to images and print copy and brings together them in a layout. This entire provision is then sent to the printing company.

    The customer wants to drag and drop PDF files to a container/s on the layout. There may be a few snap involved too. Has anyone ever heard talk about this before? I guess they use PDF, so it has the safety element and images and type cannot be changed accidentally.

    Is there a best practice in this respect? I am a novice in the management of the PDF.

    Thank you very much

    Phil

    I am sure that he met the two of us. The only thing had it right in this discussion was to click on the links to the right answer for each of our messages. Your 'dumb' message seemed to be in response to John post so I if you meet John. Regardless of who answered that this whole discussion is really stupid. Phil has an apparent problem completely describing her problem. Instead of posting of the specific error messages, he simply said "no go."

  • Drag, drop AND MouseEvents

    I am trying to build a mapping application and data running on the issues of the event presented with DND. I would like to draw a line "stretching" between "ports". When the target port, I would like to drop some info on it. The commented code below (with the _port.setOnDragDetected method) is the stretch described (ports are expanded to the demonstration).  If this block of code is uncommented, the drop works as I need to, but events are delivered to the linework.  Problem is that I need two.
    public class DataXferView extends Application {
    
        private Line connection;
        private Group root;
        private HashMap<String, Color> colorMap;
    
        private void init(Stage primaryStage) {
            colorMap = new HashMap<String, Color>();
            colorMap.put("1", Color.LIGHTBLUE);
            colorMap.put("2", Color.ORANGE);
            root = new Group();
            primaryStage.setScene(new Scene(root, 400, 300));
    
            Group outPort1 = createOutPort(50.0, 50.0, "1");
            Group outPort2 = createOutPort(50.0, 125.0, "2");
            Group inPort = createInPort(250.0, 75.0);
    
            root.getChildren().add(inPort);
            root.getChildren().add(outPort1);
            root.getChildren().add(outPort2);
        }
    
        private Group createOutPort(double _topLeftX, double _topLeftY, String _portId) {
            Group outPortBox = new Group();
            Rectangle borderBox = RectangleBuilder.create().x(_topLeftX).y(_topLeftY)
                    .width(100).height(40).fill(Color.WHITE).stroke(Color.BLACK).build();
    
            Circle port = CircleBuilder.create().centerX(_topLeftX + 80)
                    .centerY(_topLeftY + 20).radius(10.0f)
                    .fill(colorMap.get(_portId)).stroke(Color.DARKGREY).build();
            port.setUserData(_portId);
    
            setOutPortEvents(port);
            outPortBox.getChildren().addAll(borderBox, port);
            return outPortBox;
        }
    
        private void setOutPortEvents(final Circle _port) {
            _port.setOnMousePressed(new EventHandler<MouseEvent>() {
    
                @Override
                public void handle(MouseEvent me) {
                    connection = LineBuilder.create().stroke(_port.getFill()).strokeWidth(2.0)
                            .startX(_port.getCenterX()).startY(_port.getCenterY())
                            .endX(_port.getCenterX()).endY(_port.getCenterY()).build();
                    root.getChildren().add(connection);
                 }
            });
    
            _port.setOnMouseDragged(new EventHandler<MouseEvent>() {
    
                @Override
                public void handle(MouseEvent me) {
                    connection.setEndX(me.getSceneX());
                    connection.setEndY(me.getSceneY());
                }
            });
    
    //        _port.setOnDragDetected(new EventHandler<MouseEvent>() {
    //
    //            @Override
    //            public void handle(MouseEvent me) {
    //               Dragboard db = _port.startDragAndDrop(TransferMode.ANY);
    //                // Put a string on a dragboard
    //                ClipboardContent content = new ClipboardContent();
    //                content.putString((String)_port.getUserData());
    //                db.setContent(content);
    //            }
    //        });
            
        }
    
        private Group createInPort(double _topLeftX, double _topLeftY) {
            Group inPortBox = new Group();
            Rectangle borderBox = RectangleBuilder.create().x(_topLeftX).y(_topLeftY)
                                                .width(100).height(40).fill(Color.WHITE).stroke(Color.BLACK).build();
    
            Circle port = CircleBuilder.create().centerX(_topLeftX + 20).centerY(_topLeftY + 20)
                                .radius(10.0f).fill(Color.WHITE).stroke(Color.DARKGREY).build();
                                
            setInPortEvents(port);
            inPortBox.getChildren().addAll(borderBox, port);
            return inPortBox;
        }
    
        private void setInPortEvents(final Circle _port) {
            _port.setOnDragOver(new EventHandler<DragEvent>() {
    
                @Override
                public void handle(DragEvent event) {
                   if (event.getGestureSource() != _port
                            && event.getDragboard().hasString()) {
                       event.acceptTransferModes(TransferMode.ANY);
                    }
                    event.consume();
                }
            });
    
            _port.setOnDragEntered(new EventHandler<DragEvent>() {
    
                @Override
                public void handle(DragEvent event) {
                    if (event.getGestureSource() != _port
                            && event.getDragboard().hasString()) {
                        _port.setStroke(Color.RED);
                    }
                    event.consume();
                }
            });
    
            _port.setOnDragExited(new EventHandler<DragEvent>() {
    
                @Override
                public void handle(DragEvent event) {
                    _port.setStroke(Color.DARKGREY);
                    event.consume();
                }
            });
    
            _port.setOnDragDropped(new EventHandler<DragEvent>() {
    
                @Override
                public void handle(DragEvent event) {
                   Dragboard db = event.getDragboard();
                    boolean success = false;
                    if (db.hasString()) {
                         _port.setFill(colorMap.get(db.getString()));
                        success = true;
                    }
                    event.setDropCompleted(success);
                    event.consume();
                }
            });
        }
    
        @Override
        public void start(Stage primaryStage) throws Exception {
            init(primaryStage);
            primaryStage.show();
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    }
    This is the problem that is described here: http://javafx-jira.kenai.com/browse/RT-16916?

    And the solution will be included in the final version of 2.1 (I am current using 2.1 b07)?

    Workaround advice are appreciated. Thank you.

    The attached code contains the following changes:
    -the block of initialization of the DND is no comment
    -the MouseDragged Manager is removed, instead, the DragOver filter is added to the stage
    -the line is marked mouseTransparent, otherwise he keeps eating the DragOver events that we want to be delivered to the port target

    He deserves a little more work, for example, it allows a transfer of data between applications, but not for the lines between applications, but the basic idea should be clear.

    public class DataXferView extends Application {
    
        private Line connection;
        private Group root;
        private HashMap colorMap;
    
        private void init(Stage primaryStage) {
            colorMap = new HashMap();
            colorMap.put("1", Color.LIGHTBLUE);
            colorMap.put("2", Color.ORANGE);
            root = new Group();
            Scene scene = new Scene(root, 400, 300);
            primaryStage.setScene(scene);
    
            scene.addEventFilter(DragEvent.DRAG_OVER, new EventHandler() {
                @Override
                public void handle(DragEvent me) {
                    if (me.getGestureSource() != null) {
                        connection.setEndX(me.getSceneX());
                        connection.setEndY(me.getSceneY());
                    }
                }
            });
    
            Group outPort1 = createOutPort(50.0, 50.0, "1");
            Group outPort2 = createOutPort(50.0, 125.0, "2");
            Group inPort = createInPort(250.0, 75.0);
    
            root.getChildren().add(inPort);
            root.getChildren().add(outPort1);
            root.getChildren().add(outPort2);
        }
    
        private Group createOutPort(double _topLeftX, double _topLeftY, String _portId) {
            Group outPortBox = new Group();
            Rectangle borderBox = RectangleBuilder.create().x(_topLeftX).y(_topLeftY)
                    .width(100).height(40).fill(Color.WHITE).stroke(Color.BLACK).build();
    
            Circle port = CircleBuilder.create().centerX(_topLeftX + 80)
                    .centerY(_topLeftY + 20).radius(10.0f)
                    .fill(colorMap.get(_portId)).stroke(Color.DARKGREY).build();
            port.setUserData(_portId);
    
            setOutPortEvents(port);
            outPortBox.getChildren().addAll(borderBox, port);
            return outPortBox;
        }
    
        private void setOutPortEvents(final Circle _port) {
            _port.setOnMousePressed(new EventHandler() {
    
                @Override
                public void handle(MouseEvent me) {
                    connection = LineBuilder.create().stroke(_port.getFill()).strokeWidth(2.0)
                            .startX(_port.getCenterX()).startY(_port.getCenterY())
                            .endX(_port.getCenterX()).endY(_port.getCenterY()).build();
                    connection.setMouseTransparent(true);
                    root.getChildren().add(connection);
                 }
            });
    
            _port.setOnDragDetected(new EventHandler() {
    
                @Override
                public void handle(MouseEvent me) {
                   Dragboard db = _port.startDragAndDrop(TransferMode.ANY);
                    // Put a string on a dragboard
                    ClipboardContent content = new ClipboardContent();
                    content.putString((String)_port.getUserData());
                    db.setContent(content);
                }
            });
    
        }
    
        private Group createInPort(double _topLeftX, double _topLeftY) {
            Group inPortBox = new Group();
            Rectangle borderBox = RectangleBuilder.create().x(_topLeftX).y(_topLeftY)
                                                .width(100).height(40).fill(Color.WHITE).stroke(Color.BLACK).build();
    
            Circle port = CircleBuilder.create().centerX(_topLeftX + 20).centerY(_topLeftY + 20)
                                .radius(10.0f).fill(Color.WHITE).stroke(Color.DARKGREY).build();
    
            setInPortEvents(port);
            inPortBox.getChildren().addAll(borderBox, port);
            return inPortBox;
        }
    
        private void setInPortEvents(final Circle _port) {
            _port.setOnDragOver(new EventHandler() {
    
                @Override
                public void handle(DragEvent event) {
                   if (event.getGestureSource() != _port
                            && event.getDragboard().hasString()) {
                       event.acceptTransferModes(TransferMode.ANY);
                    }
                    event.consume();
                }
            });
    
            _port.setOnDragEntered(new EventHandler() {
    
                @Override
                public void handle(DragEvent event) {
                    if (event.getGestureSource() != _port
                            && event.getDragboard().hasString()) {
                        _port.setStroke(Color.RED);
                    }
                    event.consume();
                }
            });
    
            _port.setOnDragExited(new EventHandler() {
    
                @Override
                public void handle(DragEvent event) {
                    _port.setStroke(Color.DARKGREY);
                    event.consume();
                }
            });
    
            _port.setOnDragDropped(new EventHandler() {
    
                @Override
                public void handle(DragEvent event) {
                   Dragboard db = event.getDragboard();
                    boolean success = false;
                    if (db.hasString()) {
                         _port.setFill(colorMap.get(db.getString()));
                        success = true;
                    }
                    event.setDropCompleted(success);
                    event.consume();
                }
            });
        }
    
        @Override
        public void start(Stage primaryStage) throws Exception {
            init(primaryStage);
            primaryStage.show();
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    }
    
  • Drag, Drop, and docking station...

    Hey guys... someone knows how to do this on FLEX?

    http://Nettuts.S3.amazonaws.com/127_iNETTUTS/demo/index.html

    or something similar to this?

    Thank you

    CyA

    You can change this http://examples.adobe.com/flex3/devnet/dashboard/main.html , then all you need to do is add panels. title windows or whatever it is that act as 'zones', you'll be ready to go.

  • Drag &amp; Drop sometimes gives excessive use of persistent processor (WKS TP June 2012)

    The host Windows 7 x 64 SP1 Workstation Tech Prev June 2012 16 GB, 4 CPU

    Comments Windows 8 x 64 Release Preview 2 GB, 2 vCPUs

    Drag / drop a file from the host to the client desktop sometimes shows the pointer of the mouse as circle with slash and translates VMware tool Core Service using 100% of the total CPU, or 50% on the two vCPUs.

    Before a Drag & Drop and after a Drag & Drop

    DragDrop1CPU.jpg

    Most of the time the CPU spikes result when Drag & Drop fails, that is, it shows a circle with a slash in the world mouse pointer, then roll the mouse off the desktop and on the back and an icon from the taskbar a few times shows finally the mouse pointer from the anchor and it can be moved successfully on the desk of comments.

    And after a few minutes, this excessive CPU reduced to 1 vCPU charge, but never goes away until vmtoolsd is finished.

    DragDrop2CPU.jpg

    Details:

    DragDrop3CPU.jpg

    DragDrop4CPU.jpg

    I noticed that there are 2 vmtoolds.exe running, dieting and the other under the user, but under the user.

    Also, I remember seeing this same behavior in an older computer, like 6.

    You can use the Task Manager to kill the vmtoolsd.exe process that uses 100% of CPU.  To restart it, you run a command line like this:

    "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" -n vmusr

    The exact command line to run is located in the registry:

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, VMware user process string value

  • Drag and drop small objects of MC

    I build a project with dots (6 X 6) as the user drags/drops on a part of the scene. These should be small, but "understandable" with the pointer of the mouse (or platforms key activated using a stylus point). I tried, unsuccessfully so far, to create these as MC inside the largest (14 X 14) points (also MC) alpha value of 0 so the greater surrounding area does not show, but would catch the smallest point MC inside. So far, does not work. The smallest point train/drops OK, but the top layer more transparent alpha of the MC shows no sign of being caught. Not sure if it is possible to drag and drop. Essentially, what I'm trying to do is set up a handful of surrounding transparent grag to facilitate the smallest point drag and drop without obstructing the area/view on which it must be positioned/deleted. Prefer not to use an element of third party for the transformation handles, if possible.

    Maybe there's a better way to do it?

    Specific measures / suggestions to achieve this, appreciated.

    Here is a link to a sample file that does what you described as creating movable objects going - out of alpha-ed more big piece while the other is not... the two slide correctly.

    http://www.nedwebs.com/Flash/AS3_Drag_alpha.fla

  • Drag and Drop 2 objects 1 target

    I'm relatively new to Flash and try to create a drag and drop.  I followed the tutorial here (http://monkeyflash.com/tutorials/flash-drag-and-drop/). A change that I made this tutorial was having the object disappear when it is deposited on the target.  By following these instructions, I was able to build a drag and drop of an object to a target successfully.  My question is what do I do if I want to have several items to go to the same target?  For example in the tutorial that happens if I added a second square object and both wanted to go to a target square.

    Any help would be greatly appreciated!

    As long as the target is always available as a target, you can drag to as many objects as you want (one at a time).  To help do that, when you drop an object on the target and make disappear, either to do this object fall go far (removeChild (dropped)) so that it does not block the path or move the target above the object dropped (addChild (target)).

  • Illustrator CC crashes whenever I have drag / drop objects

    Hi guys,.

    Yesterday I bought Illustrator CC, and since then, whenever I have to drag and drop any object, the program crashes. I tried to delete the preferences file, then restarted the system – so Illustrator worked for awhile, but then the problem appeared again. I used Adobe CC Cleaner tool, then reinstalled Illustrator, nothing happened, always the same.

    I use a Macbook Pro (late 2011) with OSX Yosemite (10.10.1), and my system and the applications running on SSD.

    Any help would be appreciated, because I can't really move forward with my work :/

    Thank you!

    Daniel

    UPDATE: Apperantly the extension Chrome, PushBullet causes this problem, so if anyone knows this, Uninstall PushBullet, clear your Caches files, reboot, and the problem is corrected. Here's where I got the idea: Re: Illustrator crashes when I try to move an object with the Selection tool

  • Drag and Drop and if / then of statements...

    I'm new to flash, so forgive me if it's a simple thing (I hope it is!)

    I have a movie that has elements that I am about to put to the drag and drop function. I know how to do that, I'm fine with that. But I want to be able to code where, once they click the button "done" on the screen of the slide / move, all that is not in a given region is set to invisible.

    For example, I make a scene where you can drag and drop different objects, clothing, etc. on a man of snow to decorate him. When they click then I want just the snow man and all the parts on him to be seen in the following image.

    Any help would be great. Thank you!

    all your clothes can be added to a parent of clothing to initialize:

    clothesParent.addChild (shirt);

    clothesParent.addChild (shoes);

    etc.

    assign your drag and drop to the shirt, shoes, etc.

    in your drop test the dropTarget function and if a proper use:

    function dropF(e:Event):void {}

    {if(e.currentTarget.DropTarget==Snowman)}

    snowman.addChild (e.currentTarget);

    Snap to position and remove the listener

    }

    }

    nextbutton.addEventListener (MouseEvent.CLICK, nextF);

    function nextF(e:Event): {}

    clothesParent.visible = false;

    }

  • I have just noticed that the function drop and drag for attachments stopped working in Yahoo and Gmail. Is it because of Firefox?

    I am currently using Firefox 19. Last week, I found that, in the Yahoo and Gmail, I can't attach files using drag and drop; I used no drag and drop for a little while if I can't say that it began with a particular Firefox update. Unlike some FF16 users I have no problem dragging autour tabs in the browser. I know that in the past, certain issues with attachments were obviously related to the browser and so the reason why I consider that this link now. I use Windows XP SP3.

    Tylerdowner, hi.

    Thanks for your reply, but remembering the cause of a problem attach previous many Firefox users had at the time of FF13 related to implementation network.http.spdy.enabled to 'true' I decided to check again in this parameter: config.

    To solve my problem at the time I, like others, changed the setting SPDY of the "true" to "false", and what I found was not changed automatically with the latest versions of FF. I found, however, that there are now two other parameters SPDY v2 and v3, which were set to 'true '. In case they were in conflict with the first setting to "false", I changed this last to 'true' also. This is I went back to Gmail and tried to attach files, first under the normal procedure by clicking the attachments and selection of a file in the dialog box, which worked (previously on 'true' it had not worked); Second, I tried to fix with the help of drag / drop, now works. I also found that drag & drop in Yahoo also work.

    Thus, a conflict between the SPDY versions could have the cause of the problem when network.http.spdy.enabled has been set to 'false '?

    If the problem persists I'll let you know. (I've attached a snapshot of the current settings).

  • I'm unable to select, crop, or drop and drag. I also cannot manually move or resize a window or a file.

    Help with the selection

    I'm unable to select, crop, or drop and drag. I also cannot manually move or resize a window or a file. What the devil?

    You're not really in the right forum for this...

    Might be interesting to try a system restore to when it worked.

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-system-restore

  • Icon of the element Cumbersom GRAND when drag & drop objects

    IM using Windows 7 Professional on my laptop and when I select a file (PDF, jpeg, etc.) in a folder and drag and drop it into another folder, a large icon that is heavy and gets in the way the destination folder appears. For example, if I move a PDF great PDF icon rises and I drag and drop it into the destination folder. The darn icon is so great that it makes it difficult to see exactly where you want to drop it. I am using Windows 7 on my desktop and when I do the same function, a very small rectangle icon or folder is used, which makes it very easy to see where I'm trying to drag and drop.

    How do I turn off these icons of gros point and use the little on in Windows 7 Professional?

    Click Start, right-click on the computer list and select Properties,

    In the upper left corner click on advanced system settings / Visual effects settings button / Visual effects section

    Scroll the list to see the contents of window while dragging / apply and OK.

    Restart your system that might not be necessary.

Maybe you are looking for

  • Why is not, the default button of Firefox for Windows XP?

    I know that the Firefox button can be displayed on Windows XP too by hiding the menu bar. But why is it not by default? If Windows XP users do not know that the Firefox button can be demonstrated by hiding the menu bar, they will not only not be able

  • VBAI - image acquisition misframe problem

    Hello I have a smart camera, NI C. 1776 when I tried to acquire the image, after 4 or 5 images, it ejects a weird picture half misframe. This will not suitable for imaging my self. I've attached a normal picture and a peak misframed to let the guys h

  • HPLaserJetService.exe

  • Are there any scans of worm or virus free by microsoft that WILL Help?

    I have an E-Machine, with MS Vista and Internet explorer9.   Move my icons, fonts My change in transition to messenger and various other programs.  I uninstalled and reloaded all.  Indtalled and ran Microsoft security essentials, I have the CCLEANER

  • HP Envy 4500: bottom of page break

    When you print a doc app PDF Expert Version 1.2 (173), the bottom of the page does not print.  I tried to select fit to page layout of the printer and selected paper 8 x 10.  Same result.