Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Flash




Droptargets. How?



Help me!

i cant get my head around droptargets. i use Flash 5 and i don't get the action script on flash help it just doesn't work!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Droptargets Via Levels?
Hi there,

Is it possible to detect whether an object that is being dragged has been let go while over a movie that is on _level0 ??

Im using multiple level dragable items, and when an item is released undeneath the higher level it doesnt register.

Thanks for any help in advance.

If 5 Out Of 13 Droptargets Are Occupied?
Hi,

I have a drag and drop game where you have to place 5 objects on either of 13 droptargets.

When you have placed the 5 objects I want a "View Solution" button to appear.

Heres the problem : I want to check if 5 out of the 13 droptargets are occupied. I have tried adding points on release BUT if the user moves the objects around thats not reliable.

The droptargets are called drop1-13 and the objects ting1 -5.

Hope you can help ...

Multiple Droptargets...
Hi. this is my first post here, im quite new to actionscripting.. hope you can help me

How do I do multiple drop targets? this is my code now, but i cant seem to get it to work on more than one target..


on (press) {
startDrag(this);
this.swapDepths(100);
}
on (release) {
stopDrag();
if (_droptarget=="/target_1") {
setProperty(this, _x, 346.5);
setProperty(this, _y, 182.8);


} else {
setProperty(this, _x, 118.3);
setProperty(this, _y, 336.9);
}
}

The code above works great, but when Im addig a extra droptarget it wont work..

How do I write that code? Hope you understand what i mean. Thanks for help!

Droptargets With An Animation
Hi, I'm new to the forum & have been using flash mx for a couple of days. I'm working on a game which I need to develop further but firstly I'm starting off with basic things & then making them more complex.

I've made a movie clip of a dart which I moves across the stage and hits a target. Now, when it hits the target ( a movie clip of a circle which is red), the circle changes to blue. However, I know the dart movie clip needs some code along the lines of
on (*event*) {
if (this._droptarget == "/circle") {
_root.circle.gotoAndStop(2);
}
}

What would the event be? I tried on (rollover) but that didn't work. Any suggestions?
The code on the circle is in the circle's first frame which is:
stop();

(so it doesnt play the second frame until the dart hits it)
I'd be so grateful for any help, as it's for my uni coursework

Droptargets With An Animation
Hi, I'm new to the forum & have been using flash mx for a couple of days. I'm working on a game which I need to develop further but firstly I'm starting off with basic things & then making them more complex.

I've made a movie clip of a dart which I moves across the stage and hits a target. Now, when it hits the target ( a movie clip of a circle which is red), the circle changes to blue. However, I know the dart movie clip needs some code along the lines of
on (*event*) {
if (this._droptarget == "/circle") {
_root.circle.gotoAndStop(2);
}
}

What would the event be? I tried on (rollover) but that didn't work. Any suggestions?
The code on the circle is in the circle's first frame which is:
stop();

(so it doesnt play the second frame until the dart hits it)
I'd be so grateful for any help, as it's for my uni coursework

Droptarget - Multiple Droptargets
Does anyone know why my dragged clip snaps even when not over any droptarget? debugger shows that target is not over any droptarget at time of release. using two droptargets with ||. Thanks


Code:
// when mc is pressed , drag it
on(press) {
startDrag(this);
}
// when mc is released stop dragging
on(release) {
stopDrag();
// if over an answer , leave it there
if (eval(this._droptarget) == _root.ardef_mc || _root.edef_mc) {
this._x = 120;
this._y = eval(this._droptarget)._y;
_root.answer1="correct";
}
// if wrong answer,
else{
// take it back to original position
this._x = 20;
this._y = 48;
_root.answer2="Incorrect";
}
}

Drag And Drop Game - DropTargets
Hi, i have a drag and drop game which uses drop targets but its too easy, the user is able to simply click the items and they snap into position, they should obviously require the user to drag them into roughly the right place but need to be placeble in any order, so on click the item and the dropzone needs to move to the highest z-index + 1, and then on release should snap back to its original z-index otherwise some drop zones mask others.

if anyone could have a look at this i'd really appreciate it, its probably quite an easy fix but i'm not sure where to start, i dont even know whats making the game too easy.

url

swf:
http://www.ats-heritage.co.uk/div/Dr...e_Miner_VB.swf

fla:
http://www.ats-heritage.co.uk/div/Dr...e_Miner_VB.fla

cheers

Droptargets Dont Work If Not On _root Timeline?
http://www.kirupa.com/developer/acti...t/dragdrop.htm
i did this tutorial, but for the life of me i just cant get the droptargets to work if the objects arent on the root timeline.

can anyone please lend a hand

Copyright © 2005-08 www.BigResource.com, All rights reserved