?
Solved

Drag Drop Rotate in Flash

Posted on 2004-09-23
6
Medium Priority
?
889 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Accepted Solution

by:
muso120999 earned 672 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 664 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 664 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

800 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