ActionScript 2.0 :: Keep Drag And Dropping All Over The Target To Finally Get The Answer To Display

May 2, 2005

my drag and drop target works...sort of. Here's the problem, when the target is dropped it should tell the user if it is correct. It does but you have ot keep drag and dropping all over the target to finally get the answer to display. I have checked the registation marks and stage alignment...nothing seems to work. it should be if you drop it over the hit (instance name) it should immediately display the answer of "correct" Here is the code for the drop target:

[Code]...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Drag And Duplicate Upon Dropping?

Feb 28, 2012

I'm doing this drag and drop animation where object 1 is dragged to object 2. When object 1 is dropped onto object 2, I need more than one image of object 1 to appear. I've used this simple code for drag and drop:

on(press) {
startDrag(this,false);
}
on(release) {
stopDrag();
}

View 3 Replies

ActionScript 2.0 :: Drag And Dropping Duplicated Movies?

May 17, 2007

Is there any way of Duplicating a movie and then calling upon it to drag and drop it else where? I can't seem to get it working since the script for drag and drop calls upon an instance name - and the instance name for the duplicated movie has a variable at the end so its different all the timeeg duplicateMovieclip("movieclip", "instance name"+i, i)I don't even know if its possible calling upon an instance name that doesn't exist until something is clicked O.o;

View 1 Replies

ActionScript 3.0 :: Drag And Drop Activity - Match Words And Meanings By Dropping And Dragging Into The Right Space

Oct 29, 2010

i'm new to flash AS3. I am trying to create an drag drop activity where the user can match words and meanings by dropping and dragging into the right space. At the moment I want to create multiple drop areas for the boxes. At the moment they will only fall within their own target area - also only the boxes move and not the text. How do i create mutiple drop areas for the words and meanings?

[Code]....

View 1 Replies

ActionScript 2.0 :: [FMX] Multi Drag Can't Find Answer?

Jun 13, 2003

I've tried searching for the answer to this all over kirupa, but couldn't find anything. Here's the rundown:

[Code]...

View 2 Replies

ActionScript 3.0 :: Drag And Drop - How To Get Correct Answer On Stage

Feb 6, 2011

Basically imagine a stage with 1 question on it and 3 possible answers. All the answers are draggable and the correct answer must be dragged to the answer area. If the wrong answer is dragged it bounces back... The problem (which in my opinion seems quite basic) is when the correct answer is dragged onto the answer area, I can't get it to do much. I can run a trace and that works so I know its setup correctly but I think i'm coding it wrong within the IF statement. My entire code for the correct answer is kept in a seperate as file and I have listed it below:

package code {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.geom.Point;
public class Three extends MovieClip {
[Code] .....

The bit where it says " if ( dropTarget.parent.name == "answer" )" I'm presuming is where the code has to go. I want to either goto a frame label within the main timeline which says "Congrats" kinda thing OR the other way I can think is adding a movie clip to the stage with the congrats msg in.

View 1 Replies

ActionScript 3.0 :: Get An Answer From Input Text Field And Compare It To The Correct Answer?

Jul 8, 2010

I am trying to get an answer from Input text Field and compare it to the correct answer.here is how my code look like:

//I have a confirm button here
confirm_button.addEventListener(MouseEvent.CLICK, ConfirmFunction);
//I have a correct answer as a String here
var correctans:String = "July";

[code]....

This will check if correct answer contains words in the answer from input text field.But that will result on if I key in "July is great", it will still link to the correct answer frame instead of wrong answer frame.I want the answer to be exact same as the correct answer.

View 4 Replies

ActionScript 2.0 :: Button Is Pushed A Answer Is Displayed And On The Answer Frame?

Aug 27, 2010

I have a grid with 12 movieclip buttons. When a button is pushed a answer is displayed and on the answer frame, there's a button "click for more information".

That button points to information in a frame within the mc button. However, when I test it all the buttons on the root timeline appear on top of this information, covering it up.

Also, when you move the mouse while in this "further info" area, it disappears

View 1 Replies

ActionScript 2.0 :: Array Re-initializing - Screen To Display Feedback Based On The Answer Of The Question

Jan 9, 2004

I have some code that initializes an array (arrQAnswer) that stores what button the user clicked on (0,1,2, or 3). That option it put into arrQAnswer, then compared against arrCorrectAnswer to see if the user got the question right. The problem is that for each time the user clicks on a button, they are taken to a new screen to display feedback based on the answer of the question. If the user gets the question wrong they are returned to the original screen and try again. This is where arrQAnswer is screwing up (or more likely, where I am screwing up). On the first question where the user chooses an answer, then returns to that screen, arrQAnswer re-intializes. Is there a way to stop this from happening? Note that it only happens on the first question, I think that is because the first question is on the same frame as the code (below):

[Code]...

View 4 Replies

ActionScript 2.0 :: Input Quiz - Check Input Answer Against Random Display From Array

Jan 21, 2009

I am trying to check input answer against random display from array. but sometime it trace not correct when it is correct this is the code i use

[CODE]....

View 7 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

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

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

ActionScript 3.0 :: Drag Object 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.

View 7 Replies

ActionScript 3.0 :: Drag And Drop Target - Does Not Work

Jun 11, 2009

[IMG]file:///C:/Users/Majken/AppData/Local/Temp/moz-screenshot.jpg[/IMG]I?m trying something perhaps a little above my level, as I have just recently begun using flash (like a week ago), but I hatred doing this code ,but it does not work.

[Code]....

View 3 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 Everything Inside The Target?

Dec 29, 2009

I'm migrating from as2 to as3 and have a problem. I have a movieclip called papel_ilus which has loaded images inside with text and stuff. I found a Drag And Drop code that constrains the movement of the _x axis and have targeted the papel_ilus movieclip. However, when I click the images inside they are dragged separately from the whole movieclip I targeted and everything is a mess. Is there a way to drag the whole "pack" as one? Here is the code I'm using:

Code:
import flash.geom.Rectangle;
var leftY:int = 0;

[code]....

View 2 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 :: 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 :: 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 2.0 :: Drag And Drop Target Stuck To Mouse

Jun 9, 2006

I've been going through some tutorials and samples of "drag and drop" flash movies and I always come upon the same bug. The drop target gets "stuck" to the mouse, and when I click the target it just drops down and doesn't return to its orig. position. This mostly happens when the target in the "lower order" is dropped behind a target that is "in front of it" Now I have used the [code]...

View 7 Replies

ActionScript 3.0 :: Drag And Drop Movie Clip On The Target

Apr 13, 2009

I have a draggable movie clip that contains a button inside to hold my code. The target area is in the root and is a movie clip. I need to be able to drag and drop on the target. When it does drop on the target it needs to play a different keyframe from the root which holds a movie clip. Below is the code I have in my button within the draggable movie:

[Code]...

it starts dragging, but for some reason the drop target isn't working or the stopDrag, because it won't stop dragging.

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 :: Does OSX FINALLY Have Scroll Wheel Support Yet

Nov 30, 2009

i'm about to develop a flash AS3 site with heavy usage of the mouse's scroll wheel.last year i had to use the Pixelbreaker add-on (URL...) in order to accomplish something that should be supported by any sane operating system + browser.so, flash-forward a year later.. can Macs FINALLY use scroll wheels in flash like every other modern OS in the world? or do i need to use this add-on still?

View 2 Replies







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