ActionScript 3.0 :: Drag And Drop With Line Draw?

Feb 23, 2011

I have the following code which create a small drag and drop interaction, with a connecting line being drawn between the two elements. I want to add a Submit button to the mix to allow the user to complete the interaction and then find out which ones where correct and which ones were wrong. Removing the lines from the incorrect ones and leaving the correct ones in place. I've tried setting up a function to switch some variables to true when the interaction has been completed succesfully but am coming upstuck...

Actionscript Code:
var score:Number = 0;var startX:Number;var startY:Number;var startLineX:Number;var startLineY:Number;//set up variables for true/falsevar circleMccomp:Boolean = false;var squareMccomp:Boolean = false;var errowMccomp:Boolean = false;var polygonMccomp:Boolean =

[code]....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Draw A Straight Line Then Drag Out A Dotted Line?

Feb 3, 2012

I'm trying to produce a game that on mouse down a dotted line (or just a line) gets dragged out following the mouse until it is realized then it disappears.

View 1 Replies

ActionScript 3.0 :: Drag And Drop With Line?

May 16, 2009

i make a drag and drop function .i want draw a line from drag to drop.i have done this with AS2.0 but i couldn't did in AS3...

var score:Number = 0;
var startX:Number;
var startY:Number;[code]....

View 5 Replies

ActionScript 2.0 :: Make A Game Where You Click And Drag To Draw A Line?

Jun 3, 2010

I have just started using Flash and I tried to make a game where you click and drag to draw a line. If that line hits the enemy, the number in a text box to the right should go down. When I slash at the enemy, and it hits him, he gets damaged, but sometimes, when I don't hit him, he still gets hurt. Download the attatched file and try it out.

View 1 Replies

ActionScript 2.0 :: Drag And Drop Objects With Line Between?

Oct 15, 2004

I was wondering if there was anyway to put a line between two or more dragable objects... The only example I can think of is [URL]

View 8 Replies

Actionscript 3.0 :: Drag And Drop On A Diagonal Line?

Nov 20, 2009

anyone can u explain how to drag a movieclip on a diagonal path..?

View 2 Replies

ActionScript 2.0 :: Video Editing Drag And Drop In A Time Line?

Mar 26, 2004

1. i am trying to drag and drop movie clips with a short video clips in it(inside movie cilp), on to another square target "tv" with buttons play stop etc.

2. on this square "tv" i want to be able to view the clip i just drag to the "tv" to (manipulate the clip with play stop on so on) and the same thing with the other clips

3. after that i want to drag the movie clips or another movie clip of the same to a time line with other movie clips and be able to play the time line with the editing movie clips as a new entire editable video clip

View 1 Replies

Actionscript 3 :: Movieclip - Draw Line Without Using The Draw API?

Apr 5, 2012

I need to be able to draw a thick patterend line between 2 points in AS3, I can't use the draw API because it doesn't all me to actually put detail (pattern etc) into the thickness of the line, I thought about perhaps using the line to create a bitmap version and then using that as a mask, but I remember many years ago seeing some examples that use a movieclip as a source for a line.

View 1 Replies

ActionScript 2.0 :: Draw A Line On Mouse Movement, Not The Static Line?

Jun 24, 2009

draw a line on mouse movement, not the static line.

I am attaching a sample which is 90 degree bounded as it has been given in animation, I want to make this or such type through mouse movement.

View 2 Replies

ActionScript 2.0 :: Draw Line Like Flash Line Tool?

Mar 12, 2010

I want to create a line tool exactly like flash line tool. But the code that I am using shows the line when we release the mouse button. How can I show the lines while it is drawing[code]...

View 4 Replies

ActionScript 2.0 :: API-draw: Check If Line Intersects Another Line

Apr 13, 2005

I'm making a very simple game that lets you draw a curve by hand (using lineTo to the mouse position on mousemove) but now, I need to check wether the line intersects wiith another part of the same line (e.g. a loop)

I first used an onrollover command, and that worked, but not always because the mouse moved too fast (same with hittest with mouse). Then I pre-drawed the line in another mc, used hittest on it, and if it wasn't intersecting, draw it in the real mc. But that didn't work because it used the bounds to test. I guess the best way is to use some mathematical formula, but that would mean I have to save all my coordinates in an array..

View 5 Replies

ActionScript 3.0 :: Drag And Drop With Outputs Based On The Drop Positions?

Jan 6, 2010

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.

View 9 Replies

ActionScript 3.0 :: Flash Release To Drop NOT WORKING On Drag And Drop?

Mar 10, 2011

Release to Drop NOT WORKING on drag and drop? Or is it something else?Can be seen here:

[URL]

Code:
var origX:Number;
var origY:Number;
for(var i:uint=1; i<6; i++){
this["choice_"+String(i)].buttonMode = true;

[code]....

View 3 Replies

ActionScript 2.0 :: Drag And Drop - Droptarget - Make Flash Drag A Ball Onpress

May 11, 2005

i want to make flash drag a ball onpress and if its onrelease and if its on the Suquare movieclip it should stop draggin. my code is like this

[Code]...

View 2 Replies

ActionScript 3.0 :: Drag And Drop - Click On The Image ,one Can Hold Down The Mouse And Drag A Copy?

Nov 13, 2010

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]....

View 3 Replies

ActionScript 1/2 :: Make A Drag And Drop Game Where Can Drag Words Into A Table Which Then Makes A Tick

Nov 21, 2010

Im having trouble with this and its going wrong. I need to use actionscript 2 and im on flash cs3.

View 3 Replies

ActionScript 3.0 :: Drag And Drop System Where The User Can Drag A Movie Clip Into An Area (Snap & Overwrite)

May 20, 2011

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:

[Code]...

View 14 Replies

ActionScript 2.0 :: Drag And Drop Mask - Mc Drag In The Same Time

Jan 31, 2011

Wen i drag mc2 i want mc1 drag in the same time.

View 1 Replies

ActionScript 3.0 :: Drag And Drop - Drop Not Always Firing?

Dec 11, 2009

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.

View 1 Replies

IDE :: Draw A Line Through A Path Line?

May 2, 2006

how I draw a line through a path line? An example I have a movieClip that is a pencil and it is moving through a path line, now I want to draw the line that the pencil draw.

View 2 Replies

ActionScript 2.0 :: Draw Line Tool Like Flash Line Tool?

Mar 12, 2010

I want to create a line tool exactly like flash line tool. But the code that I am using shows the line when we release the mouse button. How can I show the lines while it is drawing

Code:
this.createEmptyMovieClip("drawing_mc",this.getNextHighestDepth());
drawing_mc.lineStyle(1,100);

[code].....

View 1 Replies

Draw A Line Across A Map?

Oct 19, 2009

How do I draw a line across the USA starting in San Francisco in frame 1, moving through Kansas City in frame 5, and then extending to New York in frame 10. By frame 10 I'd like to see the whole line, representing the whole journey I took in my car over summer vacation.
 
I can make a "dot" do this in flash (ie without leaving a line trailing behind it) but I don't know how to make the line "grow" across the USA over time.

View 4 Replies

IDE :: How To Draw A Line

Jun 7, 2009

how to draw a simple line? Im not using designer (which means i call Document class method that ouputs everything).

View 2 Replies

ActionScript 3.0 :: How To Draw A Line

Jan 12, 2010

i am trying to create a line that can be draggable and extedable from start and end points of line.

View 1 Replies

ActionScript 2.0 :: How To Draw Line With XML

Dec 29, 2010

The Xml
<?xml version="1.0"?>
<root>
<route portStart = "USLAX"
portStartx = "2014"
portStarty = "433"
portEnd = "JPTYO"
portEndx = "1995"
portEndy = "456" />
[Code] .....

View 1 Replies

Flash - Programmatically Draw A (drop) Shadow?

Jul 21, 2011

This probably goes for all programming languages. I use Adobe Flash AS3 and for some reason that is boyond this post, I cannot use built-in dropshadow filters. I do, however, have bitmap data available, with color and alpha values. So there should be a way to draw my own dropshadow filter.... right? Any good existing algorithms I should go and check out? Not specifically looking for an AS3 implementation, any other example will probably allow me to convert the code.

View 1 Replies

ActionScript 3.0 :: Simplest Way To Draw A 3d Line

Feb 10, 2009

What is the simplest way to draw a 3d line? E.g. I want a vector from (0,0,0) to (50, 100, 50).Do I have to do it the old school way with maths or is there some new 3d drawing API? (I heard f10 had lots of new 3d stuff...)

View 4 Replies

ActionScript 2.0 :: Draw I Line From A To B And Update It?

Sep 24, 2009

I'm making a fishing flash game where you drop your hook off a boat and i want to draw a white line from the boat to the hook and the hook can move up and down so i want it to stay with the hook

View 1 Replies

Draw A Curved Line In Flash?

Jul 16, 2009

I'm trying to draw this hint box and was wondering if anyone could explain to me how to draw a curved line like the one below in flash?

View 4 Replies

ActionScript 3.0 :: How To Draw A Line Between Two Buttons

Jun 29, 2010

make two movable buttons connected with a line. When changing position of any button you'll change look of  the line of course  I know how to draw a line but after MOUSE_DOWN, and  I don't know how to remove an old one line, and how make this line t  be shown all the time?

My code
btn2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler3);btn2.addEventListener(MouseEvent.MOUSE_UP,

[code]......

View 6 Replies







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