Solved

Drag Drop Rotate in Flash

Posted on 2004-09-23
6
857 Views
Last Modified: 2010-10-12
I need to create an interactive page where users can drag furniture on to a floorplan.  They will need to be able to rotate the furniture and delete placed furniture as well.  This is a perfect example of what I'd like http://www.jordans.com/roomplanner.asp.  Can anyone help me?
0
Comment
Question by:rachelcjanssen
6 Comments
 
LVL 10

Accepted Solution

by:
muso120999 earned 168 total points
ID: 12138565
If you have Flash MX (or MX 2004) there is an excellent Macromedia tutorial for rotate, drag and drop in the form of a Jigsaw:
http://www.macromedia.com/devnet/mx/flash/sample_files/
http://alf3.urz.unibas.ch/doku/getfile.cfm/FlashMXTutorials.pdf?did=63
0
 
LVL 2

Assisted Solution

by:DarkEntity
DarkEntity earned 166 total points
ID: 12139640
for drag and drop, work with:
<movieclip>.hitTest(_root._xmouse, _root._ymouse, <true or false here to determine use of bounding box>)
this checks if your mouse cursor is over the interactive instance. then for checking if the mouse button is pressed:
onMouseDown() { _IsMouseDown=true; }
onMouseUp() { _IsMouseDown=false; }

for rotating, use:
<movieclip>._rotate = <some numerical value>
0
 
LVL 39

Assisted Solution

by:blue-genie
blue-genie earned 166 total points
ID: 12158390
In theory, here's what i'd do.

Create a movieclip to have the panel as per your reference site.
on the drag action, when the movieclip is released, it sets itself as the current focus object, and then you can adjust _x and _y, rotation and any other properties of that current object.

I'd imagine you won't want to test for a particular hitTest, if you want to give the user total free reign to move the items around to wherever they want.

i did something similar for a kids game, however it wasn't an ariel view, rather front view, the way we gypped that for example was to have a movieclip with 4 keyframes and 4 possible angles of view, which swapped out depending on drop target.

blu.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Embedding Flash App/Movie on Website 3 503
FLV versus SWF 11 283
File drag and drop 6 147
System Center Configuration Manager 2012R2 7 92
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question