Solved

Drag Drop Rotate in Flash

Posted on 2004-09-23
6
850 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now