ActionScript 2.0 :: Furniture Configuration App - Drag N Drop Application With Logic?
Oct 7, 2006
I need to develop a Build-Your-Own cabinet configuration application for a cabinet company. I need it to be a drag n drop application. there is a grid system involved, where you can fit 3 large cabs in a grid, or 6 small ones, and so fourth...so there is logic involved. Anyone ever build something similar? a drag n drop application with logic?
I'm currently trying to create an application whit some drag and drop functionality but I'm having a hard time trying to figure how this can be done.What I have is basically a rectangular MovieClip which will be the main container where multiple smaller rectangular MovieClips are going to be dropped the thing is the that the same movieClip can be dropped multiple times and of course it needs to be at a different position and here is where I'm confused, I know how to create the drag and drop actions, what I don't know is how to check and see if the main container has movieClips to determine the next available space and place the next movieClip accordingly basically drop it at the bottom. The way I'm currently doing it only works if the same movieClip is drop only once if I drop the same movieClip twice it basically overlaps on top of the first one.
i'm now trying to create a drag and drop application. Once i dragged the object to the target area, what should i do to make it movable false after i dropped it.
I have created one drag and drop application in flex and i am trying to load my application[swf] in flash.But i am getting error while start the drag.[code]
I am creating an application that will allow users to model system information by allowing them to Drag and Drop objects from a Flex Tree into some sort of canvas/grid ie: like a whiteboard application eg: Visio/MS Powerpoint etc. The application requires the following functionality:
Drag and drop items from a Tree to some sort of canvas/grid Move items within the canvas/grid Delete items from the canvas/grid Resize items in the canvas/grid Save the position of the items to a database Has good performance in terms of rendering components with images I am not sure which Flex component is best suited to the canvas/grid. I was thinking of using either:
Datagrid or (can't drag/drop to cells easily though) Grid or (can drop to cells via gridrow/griditems mxml tags) TileList or (problem with this is that it rearranges all items when you move 1 item) some other list? I think the grid would suite my purposes the best as it would enforce objects to be placed within a gridrow/griditem.
in the following SWF example: [URL] you can see small iphone application created with flash cs5, this application has blue rectangle, you can drag and drop this rectangle with your mouse cursor.. ok no problem in the code, but i want ask a question: when i run this application in iphone device, my finger will drag and drop the rectangle instead of mouse cursor ? or I need change the code? here is the code i used:
We are using an XML file as an external configuration file for several parameters in our application (including default values for UI components and properties values of some service layer objects). The idea is to be able to load the XML configuration file before the flex application initializes any of its components. This is crucial because XML loading is processed a-synchronously in flex, which can potentially cause race-conditions in the application.
For example: the configuration file holds the endpoint URL of a web service used to obtain data from the server. The URL resides in the XML because we want to allow our users to alter the endpoint URL according to their environment. Now because the endpoint URL is retrieved only after the XML has been completely loaded, some of the application's components might be invoking operations on this web service before it is initialized with the correctendpoint.The trivial solution would have been to suspend the initialization of the application until the complete event is dispatched by the loader. But it appears that this solution is far from being trivial. I haven't found a single solution that allows me to load the XML before any other object in the application.
Simple drag and drop application where mc is dragged out of one parent mc and dropped into another parent mc.All works OK until I added 2 text boxes to the mc's -- one is a non-selectable dynamic text box (a label) which is set by the code, the other is selectable input text that the user can amend.
Finger cursor disappears when user hovers over the section of the mc that contains the text fields (even non-selectable text??) When the user trys to drag the mc by inadvertantly click-dragging anywhere within both text areas it causes this error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@2374a381 to flash.display. MovieClip (same error appears for both text boxes)
The input text box may confuse the user - how do they sometimes click to drag and sometimes click to amend? I need to create an overlay area within the mc that is click-detected for the drag? Here's the relevant bits of code:
var itemArray:Array = [ {iname:"police",ititle:"POLICE OFFICER"}, {iname:"insurance_assessor",ititle:"INSURANCE ASSESSOR"},[code].............
I am looking for an approach that will allow me to (somehow) dynamically pass the server name, server port, and web context to my Flex client so it can create a ChannelSet for it's RemoteObjects to use. These three properties are, of course, readily available to my Java server-side code so I just need a way to get them to the client.
By default, Adobe says you should compile your Flex application against the server configuration file "services-config.xml". This is a highly inflexible practice that Spring says should be avoided (I agree).
One popular approach is to use Flex's http service to download an XML configuration file. I like this idea, but I don't want to hard-code an XML file and keep it inside my WAR file. Is there a way to dynamically generate this from Java code?somehow use flashvars to pass the properties in from the containing HTML page to the SWF file. But again, I don't want to hard code them into the HTML page. Is there a way (maybe with Javascript?) to dynamically set the value of these when the page loads?
I'm trying to make a simulation where a person can drag 2 different objects to any 4 predefined targets on the stage. Based on the position of the 2 objects there will be a different output text. I hope I described that clearly. I would also like the 2 objects to snap to the 4 targets. Im very new to AS. Im starting to be able to read it a bit but still can not wright it.
I want to have an image and when I click on the image ,one can hold down the mouse and drag a copy to where ever on the stage and when one lets go, one can drag another and another with each copy still being able to be dragged after released.this is what i have but its pretty simple and doesn't work....
stage.addEventListener(MouseEvent.MOUSE_DOWN,makeA Box); var i:Number = 1; //i will be the total number of boxes var newBox:myMC = new myMC();[code]....
Im trying to do a drag and drop system where the user can drag a movie clip into an area. Although i would like to make it snap to a target instead of just sitting wherever it lands in the area. Problem Two:
The next thing i am trying to do is when the user has a movie clip on a target already, and trys to put another movie clip in that target area, it will replace the one thats in there and go back to its current position. Here is the script of what i have done so far:
I have added drag and drop to some of my custom components.The drag event is fired on mouse down.If you mouse down and move the component around then drop it repeatedly its fine.But if you mousedown and drag the component around drop it and THEN just click on the component it inits the drag but doesn't fire the drop event.Its almost like you have to move the component for it to fire the drag drop event.This is very annoying as i'm removing the component on drag init and adding it again on drop, so just clicking on it makes it disappear.
I don't want to visually arrange 3D models dragging them with the mouse, all I want is: Given a room of certain dimensions (L,W,H) and given a set of elements like beds, chairs, etc (with L,W,H dimensions, of course) I want to automatically arrange those elements to take advantage of the space as much as I can. So I want to be able to put as much furniture as I can in a given room. At the end I need to represent the arranged items visually, inside the room.
My first thought was to use an array of items and sorting it with array.sortOn(["l","w","h"] Array.NUMERIC) and then define a gap between the objects and make the maths to put the objects one next to another, etc. but that isn't a good approach because some items may be placed on top of another ones (boxes of the same size, boxes on top of tables, etc).
I downloaded a free flash menu component. It's help file said "You can simply drag and drop the menu items wherever you wish".However, I don't know how to drag and drop it in my file. please help me, how to use it?
I am developing a simple drag and drop game..except my draggable items are in a movie clip and my targets are also in a movie clip. My draggable objects work fine, they drag and snap back into place when the mouse is let go, but... they dont snap to their targets.They do snap to their targets when they are directly on the timeline, but inside another movie clip it doesnt work and i can't figure out why.[code]
Basically, there will be two images, which participants are to choose between. Below the pairs of images will be a horizontal bar with arrows at both opposite ends. I would like the participant to be able to drag and drop a small rectangle somewhere along the bar to represent their choice (and the degree of their endorsement).Basically, I'm asking how to make an interactive scrollbar on its side (without buttons, just the drag). I would also like it to start in the middle of the bar and be able to be moved in either direction.
I am trying to do a flex drag and drop. It is very similar to this first example.url....The problem is that event.currentTarget.mouseX,mouseY is showing the position where I put the mouse down rather than the position where I had finished dragging.
I am trying to create an elearning exercise and i have a problem with the drag and drop section i have created. The exercise works well but when the user clicks the next button to go to the next frame one of the drag elements from the exercise shows up on the next frame and i just can't work out how to get rid of it?
This is an overly complex way of making drag and drop functions, I know. My problem is, when my item hits the target, it doesn't allow me to drag anymore items?
ActionScript Code: square.addEventListener(MouseEvent.MOUSE_DOWN, drag) function drag(event:MouseEvent):void {