Solved

Drag Drop Rotate in Flash

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
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,…
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): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

758 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

23 Experts available now in Live!

Get 1:1 Help Now