Can't Make Droptarget Work

Mar 31, 2010

I have been going nuts all day trying to figure out why my 'drag and drop onto a target' movie doesn't work. I have a movie clip to drag onto another movie clip which is the target.when the first clip is dragged onto the target clip i want the target clip to gotoandplay(2);

the clicking and dragging and stopdrag() etc works, but when I drop the piece over the target, it just does nothing.here is my code on the MC that is being dragged:

on(press){
startDrag (this, true, 135, 95, 700, 440);
}
on(release){

[code]....

btw, I am using actionscript 2.0

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Droptarget Won't Work?

Sep 15, 2009

I made a flash site and one of the pages has drag and drop functions with drop target actions, so that text appears once dropped onto a target.It works fine but when I have it loaded inside an external editor, the drop and drag still works but the drop target function stops working.

View 0 Replies

ActionScript 1/2 :: Drag And Drop Movieclip - "droptarget" Function Does Not Work?

Aug 11, 2011

I have 12 movieclips on one layer, each are draggable some perform an action some dont. The problem is the levels when they are dragged some are above the other clips on the same layer and some are below. I want the dragged clip to be above all clips. Also on the stage there are text boxes over the "droptarget" they have to be on a layer above to be visible. So therefore the area where the text box is does not allow the dragged item to perform its task, the "droptarget" function does not work.

holder_mc11.onRelease = function(){holder_mc11.stopDrag();[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 :: Width Doesn't Work - How To Make It Work

Apr 21, 2010

I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.

I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.

Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410

View 4 Replies

ActionScript 3.0 :: How To Use Droptarget

Nov 29, 2009

in AS2 it was

Code:
on (press) {
startDrag(this);
}
on (release) {

[Code]...

i want "x_mc" to droptarget on "y_mc" and use an action

View 2 Replies

ActionScript 3.0 :: Droptarget Only Contain 1 Mc?

Feb 18, 2009

I'm having a little problem of which I'm guessing the solution isn't that hard.. but I just can't put my finger on it...

The thing is: I have got 5 movieclips which are able to drag and drop. Next to that I've got 20 containers which are all droptargets. The movieclips are able to be dragged and then dropped on a container. So far so good. But what I want is that when I drop a movieclip on a container which already has a movieclip dropped on it, the first movieclip gets removed and the second movieclip is dropped on the container. Or you could also say.. that the second movieclip replaces the first movieclip. This instead of the fact that a container has multiple movieclips dropped on itself.

[Code]...

View 3 Replies

ActionScript 3.0 :: Null DropTarget?

Jun 14, 2009

I'm testing out some different things right now and I'm trying to make a box, that, when one of two balls is dragged and dropped into it, causes the correct color text to display (i.e. redBall displays "RED", blueBall displays "BLUE" when dropped into box).I've gone through a few different ways of doing this, but now I"m trying to use dropTarget.I'm finding that when I drop it into the box using the code below, everything works fine, but if I drop is anywhere outside the box, I get an error stating "Cannot access a property or method of a null object reference."I'm assuming that I'm just wording this second dropTarget conditional statement (if (e.currentTarget .dropTarget == null)) incorrectly, but I'm not sure how to fix it.Here's the code of the dropping function I'm using:[code]....

View 3 Replies

ActionScript 2.0 :: Use Droptarget With Dot Syntax?

May 19, 2004

How can I replace this code to use dot syntax instead of slash?[code]...

View 1 Replies

ActionScript 2.0 :: Using Droptarget With Dot Syntax?

May 19, 2004

How can I replace this code to use dot syntax instead of slash?

Code:
square.origX = _x;
square.origY = _y;

[code].....

View 1 Replies

ActionScript 3.0 :: Emptying A DropTarget On MouseEvent?

May 5, 2009

I'm building a grammar excercise where I've got 24 drag'n'drop cards (movieClips), that I can drop into two 'slots' or dropTargets. Each card has its corresponding card, and when the right cards are dropped in the dropTargets, they get a 'well done' message, and a button appears so the user can go on to matching the remaining cards. When the button is clicked, I want the dropped cards to simply disappear.

View 7 Replies

ActionScript 3.0 :: Droptarget.name Not Working Properly?

Aug 6, 2009

I'm setting up some objects connected to classes onto a movie clip dynamically, and although I'm setting the name fine, when I drag another movie clip on top of it and trace for droptarget.name I always get something like "instance01" what am I doing wrong?

View 4 Replies

ActionScript 2.0 :: Create A Droptarget Dynamically?

Oct 10, 2010

How can I create through actionscript (i.e. not drawing it on the stage) a drop target that works? For some reason I can't work it out. I tried the following code (it looks reasonable), but nothing happens when I drop the square_mc on the target[code]...

View 2 Replies

ActionScript 3.0 :: Something Similar To CurrentTarget With DropTarget?

Mar 10, 2009

is there something similar to currentTarget with dropTarget?Right now dropTarget will get me the "lowest" DisplayObject possible, but I'd like to get the top-most. I cannot use parent as my objects are of different nesting depths.

View 1 Replies

ActionScript 3.0 :: DropTarget And Mouse Overs?

Feb 21, 2010

I have a drag and drop based SWF. When I pick up a MC and move it , when I put it down it gives me the MC it is on.However there are times when the returned MC isnt the intended MCEg. The top of the MC is *just* on top of One MC but the mouse pointer is over another (the intended spot), So I am trying to find out if there is a way to return the MC that the mouse is over, rather than the MC's top left corner.

View 1 Replies

ActionScript 3.0 :: Droptarget 1009 Error?

Sep 28, 2011

I am teaching with an basic AS3 programming class and we are looking at drag/drop. I cannot get the following code to work without a 1009 error when not dropping the ball into the inventory box.What we are trying to accomplish is creating an inventory for an adventure game.

Code:
function ball_drag(event:MouseEvent):void {
ball.startDrag();

[code]....

View 5 Replies

ActionScript 3.0 :: Make A Sprite Button With Graphics And Can't Make It Work?

Aug 22, 2011

* I have a flash project called contact

* The document class is ContactClass

I am trying to make a sprite button with graphics and can't make it work. I have successfully added text fields so I know the path is correct. I suspected my code was correct and confirmed it should be, after reading several tutorials showing the process for creating sprite buttons with graphics. Anyway, I imported nearly every class on Earth, but certainly everything which needs to be. Stage is gray and 800x600.The graphics code by itself with appear, but not when linked to the sprite. Also, the sprite won't appear no matter what. Another interesting piece of the puzzle: nothing will trace, not even objects such as textfields which actually appear and function on the stage when I text the code.

public class ContactClass extends Sprite {
public function ContactClass() {
var home_btn:Sprite = new Sprite();[code]....

View 3 Replies

Professional :: DropTarget Check Against All Objects On The Stage

Oct 1, 2010

Not sure the best way to do this. I have a class we will call DropActivity, here is the code

[Code]...

when the stopDraggingMe() method is called from another object (code shown below) I need to see all the objects on the stage to see what objects on the stage my currently selected movie clip is over and assign it to the dropCheck.checkAgainst method (that will be checked against an array to see if it can in fact be dropped, if so set the canBeDropped value to true and therefor run the .stopDrag() ). I have read using root is not a good coding practice in AS 3.

[Code]...

View 3 Replies

ActionScript 3.0 :: Disable DropTarget Method For Specific MC?

Feb 20, 2011

I want to drag a object using a animated hend (MovieClip) and drop it in a holes. I cannot use dropTarget method to this because when i trace(object.dropTargat.parent.name) output shows "hend" only.

View 3 Replies

ActionScript 2.0 :: Action For A Draggable Button With Droptarget?

Jan 10, 2005

I have a draggable button , and I need to go to "scene1" when the draggable button is dropped into a droptarget ("dentro1") But it doesn�t work with this action (gotoAndPlay), it works with load movie, or get Url. It only goes inside de droptarget (called "dentro1") This is the code of the draggable button:

on (rollOver) {
startDrag(root_draggablebutton, true);
}
on (release) {

[code]...

View 1 Replies

ActionScript 1/2 :: Single Droptarget For Multiple Movie Clips?

Aug 19, 2010

I have a movie clip which i use as a drop target. And I have four additional movie clips which can be dragged and dropped into the droptarget movie clip. But when I place a movie clip into a droptarget and I drop the second one too, the droptarget for the second one becomes the first movie clip but not the actual droptarget movie clip.

View 3 Replies

ActionScript 2.0 :: DropTarget Not Working When Puzzle Loaded Into Movie

Nov 14, 2002

I have a problem with _droptarget. I created a puzzle in witch the target works. Now I want to load the puzzle into an other movie, lets say in _level100. Everything in the puzzle works, except for the _droptarget.

View 1 Replies

ActionScript 1/2 :: Draggable Objects Don't Register On The Droptarget As They Are Within Another Movie Clip

Apr 9, 2010

Unfortunatly im having to extend to more draggable objects. So they will be within another movie clip so i can have them scrolling. After making the scroll, the draggable objects dont register on the droptarget as they are within another movie clip. Below is i think the part of the code that needs to be changed so the draggable objects know where to find the drop target.

View 1 Replies

How To Make Buttons Work

Dec 16, 2009

I am a new comer to flash and I have been teaching myself actionscript 2.0 and I am now trying to move to action script 3.0 this seems a dumb question but for the life of me i can't figure out how to make my buttons work.i am trying to have the user click at button that connects to a movie clips and plays the movie, the movie stops then goes to the next frame of animation.

View 1 Replies

Professional :: Make F5 Key Work?

Nov 30, 2010

I cant find any conflicting assignments in keyboard preferences.

View 6 Replies

ActionScript 3.0 :: DropTarget Parent Child - Removechild Won't Remove A Child

Aug 21, 2010

I have an issue where removechild won't infact remove a child. I think its something to do with my dropTarget.parent issues. The concept of the code is that you drag a source onto a destination. When you drop the source onto the destination you will get a text field that says "Hello" or "Goodbye". The objective i want to achive is that once i drop a source onto the destination, removechild will remove any previouse textfields added. This is proving difficult.

[Code].....

View 3 Replies

Cannot Figure Out How To Make Buttons Work?

Nov 29, 2009

I have a 3 screen project and there are two buttons on each screen that have to be able to enable the user to jump to the appropriate screens when clicked on. I am totally new to flash and I have tried off and on for a couple weeks to figure this out in various books and online. I just can't figure out what I'm doing wrong.

View 1 Replies

Professional :: Can't Make Hyperlink Work

Nov 10, 2010

When I test the movie my hyperlink works fine, but when I publish it, doesn't work. I'm not experienced with ActionScript. Here are some screen shots of what I got...

View 3 Replies

Javascript :: Way To Make SIFR Work

Dec 3, 2009

It works perfectly when pulled within labels like in the demo.[code]note: (id="slidesbigtext") loads text from javascript without any issues, just can't find a way to make sIFR work in this situation..

View 1 Replies

How To Make Flash Work With PhantomJS

Mar 27, 2012

I'm using PhantomJS 1.4.1 (support for plugins like Flash was removed in 1.5) complied with --qt-4.8.I cannot get Flash to be enabled inside PhantomJS. I use the --load-plugins=yes option. I set up QTWEBKIT_PLUGIN_PATH to all the paths that contain libflashplayer.so:

QTWEBKIT_PLUGIN_PATH=/usr/lib/browser-plugins:/usr/lib/flash-plugin:/usr/lib/mozilla/plugin:/usr/lib64/flash-plugin:/usr/lib64/mozilla/plugins:/usr/lib64/opera/plugins

[code].....

View 1 Replies







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