Professional :: Drag Drop Objects To Multiple Target Areas?

Oct 30, 2010

I am trying to make a quiz on metals. I have several elements which i want to fall into multiple target areas (e.g. the target areas are shaded grey in the following swf; metal_mc, nonmetal_mc, metalloid_mc). I can make individuals match to target areas (as there are tutorials for that) but i want each one to be able to slide in to any target area (and someday i want to create a solve button which will then place each element in the correct place). have started all over and have designated only chlorine to move (for the moment) but how do i code it to allow it to fall into any of the grey areas?

var objectoriginalX:Number;var objectoriginalY:Number;chlorine_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);chlorine_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);function

[code].....

View 6 Replies


Similar Posts:


ActionScript 3.0 :: Drag And Drop Multiple Objects, 1 Target?

Feb 9, 2010

I have been trying forever to figure out how to add multiple mc's (images) with different instance names to 1 target only (another image). All of the mc's and the target are placed on the same layer. All I want it to do is snap different images to the same target. I have tried placing the target on a seperate layer but it does not work either.

Here is the code:

ActionScript Code:
cat_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
cat_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
dog_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);

[code]....

View 2 Replies

ActionScript 3.0 :: Drag And Drop Multiple Objects To Multiple Target?

Sep 10, 2009

im creating a small drag and drop game in AS3-
 
I have 4 objects and 4 targets,
 
I want to be able to drag any of the 4 objects onto any of the targets, right now all I can manage is to allow each object drop onto one specific target only.
 
I thought by calling all my target names by the same instance name eg target_mc that would work but only one target will ever work.

View 8 Replies

ActionScript 3.0 :: Drag And Drop - Multiple Objects On Single Target?

May 16, 2011

I want to create an interactive learning module that would use a simple drag and drop test. I've already browsed the net for guides and it led me to monkeyflash.com that gave me a very helpful guide. On the guide, there can only be one object be dragged to a target. But then, I wanted my test to have multiple objects (movie clips) be dropped on a single target (also a movie clip) only and stick to it. I'm thinking that I could place my draggable objects on an array, but I really had difficulty on executing this.
 
On the code below, a drag object can only be placed on one target only (i.e dragIn1 can only be dropped on targetdragIn1 but not on targetdragIn2). Yet, I want all dragAt objects be dragged on all targetAt, dragIn with targetIn, and dragOn with targetOn.

[Code]...

View 2 Replies

Professional :: Drag And Drop Objects To Multiple Targets?

Nov 27, 2010

i have tried a lot of time to make my project into a success.this is the link to my swf...all objects are accepted when i drop it into the plastic bin

var startX:Number;
var startY:Number;
var counter:Number = 0;

[code]....

View 3 Replies

ActionScript 3.0 :: Drag And Drop Objects Onto Target MovieClip

Sep 14, 2009

I have been working with a very simple tutorial over at [URL], where you drag objects onto a target movieClip. My question is this, how do you target a movieClip inside a movie clip? What I have are 4 color squares that I want to drag and drop onto a pattern_mc. I put the target mc's with in the pattern_mc. In the tutorial the target mc's are not in a movie clip. I put my target mc's in a movieClip because I want to use the pattern_mc as a material, and I thought this was the correct way to this.

Code:
//record objects starting position
var startX:Number;
var startY:Number;
//activate objects to be moved
square1mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
square1mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
[Code] .....

View 11 Replies

ActionScript 3.0 :: Multiple Hit Target For Drag N Drop?

Nov 7, 2009

1. I created the dropzone script, in which has to be dynamic in size so that people can the tiles to design their floor board. Problem is, if the dropzones are too close to each other, the app has problems deciding where to drop the tile. (the tile floor is diagonal, imagine a diamond looking tile) I dont know what to do in order to securely place tiles where it shuld be... the dropzones are too close to each other..!the tile can either be full tile, 1/2 and 1/4 tile. How do I do this? I managed to get the drag n drop for full tile to work, but I dont know how can I do it with 1/2 or 1/4 tile. Should I split the dropzones into 4 sections? If I did, then I'll have a problem with full tile? For dropping let say, a pyramid-shaped tile onto a Full Tile would be very2 confusing

View 1 Replies

ActionScript 3.0 :: Drag And Drop Multiple Items To One Target

Jul 15, 2010

I'm trying to create an interactive game where multiple movieclips can be dragged onto a single target. I understand that the target and the movie clip have to have the same name, like "book_mc" has to have a target of "targetbook_mc", but is there another way to do this so that "book_mc" and "pencil_mc" can both have the same target?

View 4 Replies

Professional :: Create A Drag And Drop Target Set?

Mar 2, 2011

I want to be able to create the following if possible:
 
Create five words that make up a sentence and they are mixed up in order. So basically I would turn each word into a Movie clip perhaps.
 
I would then like to assign a target hotspot for each word so that a user can drag the words into the correct order.
 
Once they are in the correct order they click a button to go to a correct response or incorrect response. Is this possible?

View 1 Replies

Professional :: Enlarge Drag And Drop Target Area?

Jul 23, 2010

if this is posted elsewhere I searched but could not find topic. I would like to know if there is a way to enlarge the size of the target drop point. Seems the users have to be spot on or the shape snaps back.
 
Any way to give users a little more wiggle room with target drops?

View 6 Replies

ActionScript 3.0 :: Unable To Drag And Drop Multiple Objects?

Apr 13, 2010

i want to be able to drag and drop multiple objects. In this code the Encryption_mc doesnt return to its original position.it returns to the position of the Message_mc.any idea how i can return it to its original position?

var encOffset:Point = new Point();var encOffset1:Point = new Point(); 
Message_MC.addEventListener(MouseEvent.MOUSE_DOWN,dragPoly);Message_MC.addEventListener(MouseEvent.MOUSE_UP,dropPoly);

[Code]...

View 3 Replies

ActionScript 3.0 :: Drag And Drop Objects To Multiple Targets

Nov 27, 2010

i have tried a lot of time to make my project into a success.this is the link to my swf... all objects are accepted when i drop it into the plastic bin.URL..

View 1 Replies

ActionScript 3.0 :: Build A Multiple Drag And Drop Objects

Jan 29, 2011

I'm trying to build a drag and drop quiz where you have a list of countries, and have to drag the correct country into a blank spot in a paragraph to correctly fill out the sentence (see attached). I can get the first country to drag and drop properly. But when I tried to code the second country in the list, I get the following error message: "1021 duplicate function definition" Following is my code:

[Code]...

View 3 Replies

ActionScript 2.0 :: Drag And Drop Separate Multiple Objects At Once?

Jun 20, 2003

I have a very limited knowledge in actionscripting so this might be a simple question for the normal people

how do you drag and drop separate multiple objects at once?

I know how to drag and drop one object but I am stumped on this one

View 3 Replies

ActionScript 3.0 :: Drag And Drop Multiple Objects / Improving Code Suggestion

Feb 25, 2010

i want to improve my code for drag drop seven different or multiple objects to be moved in any three of target places then target value will be search by category or feature wise,[code]

View 3 Replies

ActionScript 2.0 :: Unable To Drag And Drop Into Their Designated Areas?

May 28, 2007

Okay, this drag and drop thing seems fairly doable, but I've never tackled it before..I have about six items that I want to be able to drag and drop into their designated areas.I would like whatever mc that is being dragged to be put on the highest level, so I will need the set depths thing to work out.Also, if you drag an MC and release it but it's not on the correct target, I would like it to animate back to it's original position. Could you point me in the right direction as to how to do this? Or help me out with any code or source files you might have?

View 1 Replies

Drag And Drop Multiple Objects And On Collision Activate/play A Video Clip

Jun 7, 2010

I would like to drag and drop multiple objects and on collision activate/play a video clip.

View 3 Replies

IDE :: Drag-and-drop Recognize Transparent Areas Of External PNGs?

Jan 21, 2009

I have a simple Flash movie which loads several external PNG-24 images into movie clipsEach movie clip is partially transparent (using alpha transparency), and made drag-and-droppable. Everything works properly except that for each movie clip, I am able to drag and drop the clip using the transparent space around the image. I want the "grab-able" area of each clip to correpond to only the non-transparent areas of the PNG, not a rectangular box around each movie clip.

View 2 Replies

Professional :: Drag And Drop To Multiple Targets?

May 11, 2010

Im trying to create a simple drag and drop app where you can drap a movieclip into multiple areas.This is the code i have so far (taken from a tutorial i found) thats works perfectly for 1 target but not for multiples. I initially tried giving the targets the same instance name but that didnt work.
 
stop();var startX:Number;var startY:Number;
square_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);square_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void { square_mc.gotoAndStop (2); event.target.startDrag(true);

[code]....

View 6 Replies

Professional :: Drag And Drop Multiple Times?

Aug 12, 2010

Is there a way to make an item, which can be draged onto the stage mulitple times? Like in making beats in music apps. You select a sample and drag it into the stage.

View 1 Replies

Professional :: Developing A G.U.I 'drag & Drop' Code Module To Place And Replace 3D Objects On A 3D Object?

Mar 27, 2010

I'm developing a G.U.I 'drag & drop' code module to place and replace 3D objects on a 3D object.

View 1 Replies

Professional :: Smooth Drag Multiple Objects As 2.0?

Sep 8, 2010

seen a few different as 2.0 code for a drag and drop, doesn't have the smoothness of as 3. Anyone have a link to drag and drop multiple movieclips, no target necessary. Just a smooth drag and drop.

View 3 Replies

ActionScript 2.0 :: CS3 Drag N Drop Target?

Jul 21, 2010

I created a drag N drop .swf that works great until i pull it into the main movie (see attached for coding). The drag works, but not the drop. I know its level's issue/pointing and the targets i.e. "/target_ex" arent being read correctly by the main...

[Code]....

View 1 Replies

ActionScript 3.0 :: Drag And Drop Target?

Sep 10, 2009

I have a drag and drop game, 4 objects can be dropped onto 4 targets, I have no problem getting it to work when there is one specific target for each object... however I want the user to be able to drop any of the objects onto any of the targets ( before it locks them down) I just cant figure out the action script for this

View 5 Replies

ActionScript 3.0 :: Drag And Drop Onto One Target

Nov 5, 2009

I have mutiple items that are supposed to go to one target. I am dragging items into a cart graphic. The problem is none of the items want to go into the cart. The target for the cart is called "cart".. Here is my code

Code:
handbag1_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
handbag1_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
handbag2_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
handbag2_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);

[Code]....

View 9 Replies

ActionScript 3.0 :: Drag And Drop Target On Top?

Jun 15, 2010

I have 4 items and 4 target zones in which the items can be dropped. I want to be able to drop several items on the same target.However, I've noticed that the space occupied by one item "covers" part of the drop target. As a result, I have to drop the next item next to the previous one. I'm wondering why each item I drop on a target zone covers the space of the target zone it occupies, and how I could avoid this. Here's part of my code (see dropit function)[code]...

View 3 Replies

ActionScript 2.0 :: Drag And Drop On A Target?

Mar 16, 2011

Im trying to drag a mc onto a target mc.ive got the drag part ok, but im finding it hard to drop on the target area.i think its got something to with the x y co ords.

View 6 Replies

ActionScript 3.0 :: Drag And Drop Color To Target Mc?

Nov 17, 2009

how to drag one movieclip(color button) to another movieclip(target to have color changed) and have it change the color of the clip?I have a color menu and I want to be able to drag the color to an mc on the stage and when released over the top of that mc it will change its color.

View 1 Replies

Flex :: Possible To Drag And Drop From 2 Sources To 1 Target?

Feb 2, 2012

My question is simple. Let's say I have 2 List Controls. 1 of Users and 1 of Tickets. (The 2 Sources). And I have a DataGrid (the target). Is possible to select 1 user and 1 ticket in the 2 list mentioned before and drag & drop them at the same time to the DataGrid? I know it's not as simple as they are going to get automatically mixed.. If it is possible... I would have to use the DragEnter Event of the Datagrid or something to mix them and create my dataProvider. But I don't know how you can drag & drop 2 items at the same time from different sources. It is possible with one source.. But no idea of how to do it with 2 sources.

View 1 Replies

Flex - Don't Let The Drag Icon Get Out Of The Drop Target?

Feb 5, 2012

I have a list with itemrenderer with dragEnabled true and dropEnabled true. Now, I am trying to tell flex not to let the dragged item (even the icon indication) leave the drop panel. I don;t care if it stop the dragging or just freezes it as if it was the application border - and I cannot. I tried to stop the dragging on dragExit handler but it seems to ignore it. Does anyone know of a working mechanism to do such? (Flex 4)

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved