ActionScript 2.0 :: Drag And Drop - Moviclip Moving Back To Old Position?

Feb 4, 2005

do a drag and drop, basically say I got A movieclip called 'clipdrag'. the current position of the movie clip is _x=65, _y=51.

and the clipdrag movieclip is droped at say _x=200, _y=300. Bascally what i need to know is how i got about bring the clip back to its orangial position, i want to use a timer so that the user can see the clip moving back slowly.

View 4 Replies


Similar Posts:


ActionScript 2.0 :: Drag And Drop - Moviclip Moving Back To Old Position

Feb 4, 2005

drag and drop, basically say I got A movieclip called 'clipdrag'. the current position of the movie clip is _x=65, _y=51.

and the clipdrag movieclip is droped at say _x=200, _y=300. Bascally what i need to know is how i got about bring the clip back to its orangial position, i want to use a timer so that the user can see the clip moving back slowly.

View 4 Replies

ActionScript 2.0 :: Moving A MC To A Certain Position Then Back Again?

Jan 26, 2006

I want to make a movie clip move left continuously and smoothly on rollover then on rollout i want it to be able to move it back to its original position with an ease. The problem is getting it to remember the position it finished in on rollover. How can i do it with actionscript?

I want to do it all with actionscript because I did it with frame labels and tweens first of all but its not smooth enough, it jumps in certain points because it cant remember how far left it moved on the rollover.

View 4 Replies

ActionScript 2.0 :: Moving Buttons Over A Drag And Drop

Sep 17, 2010

I am doing a project at school which is based on google street veiw for the inside of school to enable people to have a look around the school online,I have succesfully managed to make a UI and put a 360 degree panorama of the corridors in school behind it which you can drag and drop left and right, which then loops around to the beginning when you reach the end of the panorama.My problem is that I want buttons on the doors of the corridor that you can click on to get a veiw of inside the room, but since the background is movable I need all of the buttons to move with the corridor,.

View 3 Replies

ActionScript 3.0 :: Drag And Drop Then SNAP BACK TO ORIGIN?

Mar 10, 2011

5 text choices (choice_1 → choice_5)5 text field targets (box_1 → box_5)FUNCTION:1. Drag the choices to the targets.2. When dropped they display in target fields.3. Then snap back.I thought I had it but no cigar ... must be close though.Everything functions properly EXCEPT when I drag a choice and drop it all five choices go to choice_5 (XY) instead of their own origin.HOW DO I SOLVE THIS?PROBLEM CAN BE SEEN HERE

Code:
import flash.net.URLVariables;
import flash.net.URLRequest;

[code].....

View 2 Replies

ActionScript 2.0 :: Moving Block From Right To Left Then Back To Original Position

Jul 15, 2004

I have a block that I'm trying to make move from right to left, and if the block gets to a certain point, it will move back to it's original position. So, I have this on my block (movieclip) right now.

Code:
onClipEvent(enterFrame) {
speed = 3
dist = 8.5
_x -= speed;
if (_x = dist) {
_x += 3
}}
But all this is doing is throwing the block at the 8.5 distance...

View 9 Replies

ActionScript 1/2 :: Drag And Drop Game Animated Bounce Back?

Jul 5, 2010

What I am trying to do is make an animated bounce back for a drag and drop game, so if the object is dropped in a location that doesn't satisfy the hitTest it bounces back to a pre set location. It seams simple but there is obviously something not working. Just so people know I am a total newby when it comes to coding in actionscript, so please be gentle as I probably won't understand what your talking about.
 
Anyway here is the code for the movie click which is being dragged.

[Code]...

View 6 Replies

ActionScript 2.0 :: Drag And Drop Position After Dropped?

Jan 28, 2009

Just trying to add a little more functionality to this code for a drag and drop interaction. Suppose I have multiple objects to drag and some will have the same target. Right now (with this code), the draggable object gets positioned in the center of it's target so my draggalbe movieclips will overlap eachother once they're dropped on the correct target.

What I'd like to do is prevent this overlapping and have the movieclips slightly offset on the y axis so they cascade a bit. Could do this by writing out alot of code for the individual movieclips but i'd like to condense it a bit.

Code:
function dragSetup(clip, targ) {
clip.onPress = function() {
startDrag(this);

[Code].....

View 1 Replies

ActionScript 3.0 :: Drag And Drop Function - Bring Shape Back To Origin?

Jun 24, 2010

I have a relatively simple drag and drop function. When the target is hit, the shape stays on it. Otherwise, it goes back to its original place.

ActionScript Code:
square_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
square_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void {
event.target.startDrag(true);
event.target.parent.addChild(event.target);
[Code] .....

The slide function is supposed to bring the shape back to its origin (passx and passy are the coordinates), through an Enterframe event. It works fine, but it only works once. And if I drop the shape, if I pick it up again, it's impossible to "cancel" this action (which means the shape keeps going back to the origin). I tried removeEventListener but no luck.

View 5 Replies

ActionScript 2.0 :: Drag And Drop Return To Original Position?

Sep 18, 2004

Trying to build a drag and drop navigation, all the drag and drop works great, the test for the hit works ie if its on the target it centers the drag clip over the target, if its of the target the drag clip returns to its start postion. What I cannot get right is the code to check if the target already has a clip on it, if it has that clip needs to return to its start position, so we only ever have one drag clip on the target.

[Code]...

View 2 Replies

ActionScript 2.0 :: Drag And Drop Navigation - Return To Original Position

Sep 18, 2004

Trying to build a drag and drop navigation, all the drag and drop works great, the test for the hit works ie if its on the target it centers the drag clip over the target, if its of the target the drag clip returns to its start postion. What I cannot get right is the code to check if the target already has a clip on it, if it has that clip needs to return to its start position, so we only ever have one drag clip on the target.

Code timeline:
Initialize vars
left = 10;
right = 500;
top = 10;
bottom = 380;
speed = 10;
targetX = targetSpot_mc._x;
targetY = targetSpot_mc._y;
[Code] .....

View 2 Replies

ActionScript 3.0 :: Drag And Drop - Leave Objects On Stage When Moving To Another Frame In Timeline?

Nov 17, 2010

I have been trying to develop a drag and drop Mr. Potato Head type game for a couple of days now. I am new to AS3 and I have hit a roadblock that I was hoping someone out there could help me get through. My game has 3 separate menus (mouths, hats, and eyes).Each menu is a nested MC which has several dragable objects. Unfortunately, when I move to the next frame on the timeline the object I drug out resets itself and disappears. Is there any way to keep a dragable object on the stage once it has been placed there? I think my problem is more of a logic and structure issue with the way that I set up the game rather than an issue with actionscript.

View 3 Replies

Actionscript 3 :: Flex - Tree Control Drag Drop .item Position?

Dec 9, 2009

just facing a difficulty with tree control drag drop..Suppose i have tree with drag-drop enabled.I want to which node(id) is droped inside which node. 1]if i drag "Cat1" node inside "Cat3",i want to identify ids of siblings of "cat1",and "cat3".2]in general i want to know the ids of current element being moved along withits new parent and new position and save these postions.3] Also "cat4" when moved outside "cat3",i want know its position and its siblings id.

<mx:XML id="treeDP">
<node label="Categories">
<node label="Cat1" id="1" isBranch="true"/>

[code].....

View 2 Replies

ActionScript 2.0 :: Different Position In Moviclip?

Nov 19, 2011

Excuse me for asking a silly question but, Why are the x and y positions of my movieclip placed in _root and _root.mc different?

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

ActionScript 3.0 :: Object Moving Back And Forth

Nov 28, 2009

I've been teaching myself 3d objects in Flash using the tool in the timeline and AS3.
My Problem is moving an object one way and at a specific point move back (and repeat) in AS3 here is the code. How can I move satillite.x one way and then in the oppisite direction?.

[Code]...

Is there a way to size these objects, or is it depedent on the size of the image map?

View 3 Replies

ActionScript 2.0 :: [FMX] Moving Forward And Back?

Feb 27, 2004

I would like to let a MovieClip to move from lets say _x 200 to _x 800. When the mc reach the _x 800 it should return to _ 200 and visa versa. I like to do this with AS instead of with motion tween.

View 2 Replies

ActionScript 3.0 :: Moving Back A Certain Number Of Frames?

Oct 8, 2010

I'm trying to go back a certain number of frames (let's say 20) after I hit the "Left" keyboard key.

PHP Code:
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;

[code].....

View 6 Replies

How To Drag And Drop

Jul 7, 2009

I downloaded a free flash menu component. It's help file said "You can simply drag and drop the menu items wherever you wish".However, I don't know how to drag and drop it in my file. please help me, how to use it?

View 3 Replies

ActionScript 2.0 :: Moving Box Back To Xpos When Reaches Certain X Coord

Nov 2, 2006

making an object move from one side to another by using actionscript. so now i was wondering how to make the box get back into the same place as it started when it reaches a certain point.

dding the code to this AS i already got:

Code:
onClipEvent(enterFrame) {
speed = 5;
this._x += speed;
}

View 3 Replies

ActionScript 3.0 :: Go Back To Start Position?

Jan 30, 2012

I have a grid of letters. I want to create the else aspect, where if you don't drop the letter on any square, it'll return to its original position. Issue is I don't declare it's original position, i simply use placement on stage.

View 1 Replies

ActionScript 2.0 :: How To Get Object To Go From Position A To B And Back

Oct 28, 2003

I am trying to get this an object to go from position A to B and back, in infinity!!I only get the object to go from A to be B and then it stops. The code is in the MovieClip actions.

Here is the code..
onClipEvent (enterFrame) {
this.onEnterFrame=goRight;
goRight=function(){
if (this._y<250) this._y+=1;
else this.goLeft;
} goLeft=function() {
if (this._y>50) this._y-=1;
else this.goRight;
}}

View 2 Replies

ActionScript 2.0 :: MX04 Button Drop-down Menu That Goes Back Up

Mar 28, 2009

I have a menu for a website I'm making that consists of buttons that play a drop-down menu movie clip when the mouse moves over them. The problem is, if the user moves the mouse off the button the movie clip stops playing and disappears. I would like it so that if the user moves the mouse away from the button, the drop-down movie clip will reverse itself from its current position and move back up into the button.I've been trying to use the on (rollout) condition, but it doesn't seem to do anything.

View 1 Replies







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