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




Move MC



I am trying to move an MC when u drag another MC.

lets say MC_one has startDrag(...) and I want MC_two to move opposite to whatever MC_one._y is.

How I move the MC_two?

Thanx



ActionScript.org Forums > Flash General Questions > Other Flash General Questions
Posted on: 01-18-2005, 05:30 AM


View Complete Forum Thread with Replies

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

Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

Allowing The User To Move Move An Object (graphic Asset)
I'm working on a Flash presentation that will be an instructional tutorial. I'm teaching users how to navigate a map and I'd like to have them move a ruler or legend to measure distances between two points. Can anyone direct me to a reference source that can help me set this up?

I'm a fairly new Flash user but very eager to learn this technique.

Thanks,

Jerry Marino

Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

Move Movie Clips On Mouse Move (opposite)
Hi.

Does anybody have idea how this thing work (the cirlcles moves)?

http://www.templatemonster.com/flash...tes/15650.html

As well as the button gets closer to mouse when near the buttons.

I cant seem to find here .


Thanks very much.

On Mouse Move, Move Movieclip Behind Mask
people,

an example of my wanted work is on:

www.boss.com
(check an item in the collection)

the photo exactly scrolls behind the mask, how to do this?

i want to implement this, please help?

THNX already!

Move Movieclip Vertically On Mouse Move
Hi, i wondered if anyone would be able to help me.

I want to create the same effect as what is used on the URL below

http://www.jobescalator.com/vacancie...ctive_map.html (scroll over the map)

I want a horizontal bar to move up and down the page as and when my mouse moves.

Can anyone help?

Thanks

On Mouse Move, Move Movieclip Behind Mask
people,

an example of my wanted work is on:

www.boss.com
(check an item in the collection)

the photo exactly scrolls behind the mask, how to do this?

i want to implement this, please help?

THNX already!

Preloader Progress Bar Not Move In IE, But Move Well In Firefox
I have been in this problem for several days. I really got frustrated about it. Pls. anybody can give me some help.

I created a general preloader using movieClipLoader object and draw a progress bar using movieClip. I set the progress bar's progress by setting bar_mc._x = percentage, and created as a swf file. when test it , it works well, when open it using firefox, it still work well, can show the gradual progress in the bar, but if I using IE 6 or 7 to open it, it will not show the gradual progress , just jump from 0% to 100% after the whole file is completely loaded.

I saw a note about progress bar not show graduate progress in Flash Player 9, so I uninstall it and install Flash Player 8 again, it is still like that.

I really don't know what 's the problem. Could any friends give me some suggestion or idea, that will be greatly helpful.

Thanks.

Scene Move = Timeline Move
Hi,
I have found a very inspiring site which made in Flash http://www.burberry.com/UK/History/History.shtml
In the history part, when you mouse over on the scene, it is not only the scene is moving but also the timeline at the bottom.

Anybody can tell me how to do it?

Yours,
Bell

Move Mc, Load Ext Swf, Move It Back
anyone got any ideas on how i could move an mc across my stage, load an external swf once it hits the destination, then move it back to it's original location? i want to do this all in actionscript 1.0, sans tweening if thats possible. i've tried to set up a function for this with if statements and loops based on x position, but i've had no luck.

Scene Move = Timeline Move
Hi,
I have found a very inspiring site which made in Flash http://www.burberry.com/UK/History/History.shtml
In the history part, when you mouse over on the scene, it is not only the scene is moving but also the timeline at the bottom.

Anybody can tell me how to do it?

Yours,
Bell

MovieClip Move To Here-if Here Move Back
How do you make a movie clip move from its current _x to a new _x and then when you click it again it moves back to the original _x?

Move With AS And Move Back Again
I have an mc called knas_mc that i would like to move something like 10 pixels to the left and 10 px up - a diagonal move. Thats not to hard but i want it to move back to its original location after it has "arrived".

I have this code that doesn't work - the problem with it is obvious but it shows what i want to happen:

Code:
MovieClip.prototype.moveIt=function(moveSpeed){
this.onEnterFrame=function(){

if(knas_mc._x<=271 && knas_mc._x>252){
knas_mc._x-=moveSpeed;
//trace(knas_mc._x);

}else {

if(knas_mc._x<=252 && knas_mc._x<268){
knas_mc._x+=moveSpeed;
}

}

}

Move On Mouse-move
peepz i have this script on a movieclip:


Code:
onClipEvent (load) {
_y = 20;
speed = 1;
}
onClipEvent (enterFrame) {
if(_y <= 0 or _y >= 297){
_y += 0
}else{
endY = 320-_root._ymouse;
_y += (endY-_y)/speed;
}

}
my problem is that if the movieclip is on 0 it stops and if i move the mouse it will not start moving again :?

please help?

Move MC On Mouse Move
Hi all . How to move this MCnavigation on mouse move. For example if I move my mouse to the right the MC Navigation text moves to the left and mouse to the left it moves to the right.
Example file: http://lex.zeelex.com/navigation.html
Is there any components can help me move it.

Make One Box Move On Roll Over, Make Other Box Move On Click
Okay here's the story: I have one box that moves the way I want it to on roll over, moves over my nav buttons and stays over them after you click one of them. The clicked button becomes where the box snaps back to. I have another box that I want to stay where it is until you click on a button. If you click on a button the box will move under the button that I have clicked on. Every attempt so far to get the second box to do that usually negates the other box's ability to do anything. Please, any help or suggestions?

Make One Box Move On Roll Over, Make Other Box Move On Click
Okay here's the story: I have one box that moves the way I want it to on roll over, moves over my nav buttons and stays over them after you click one of them. The clicked button becomes where the box snaps back to. I have another box that I want to stay where it is until you click on a button. If you click on a button the box will move under the button that I have clicked on. Every attempt so far to get the second box to do that usually negates the other box's ability to do anything. Please, any help or suggestions?

How Can I Move A MC With AS?
I know how to animate a movieclip using tweening, but I would like to be able to create the same effect using actionscript. Basically what I need is an onClipEvent that takes the _x and _y position and then adds a specified number of pixels to each. Could anyone help me out with some code which would allow me to do this?

Move To Top?
I have a page which is very long and uses the browser scroll.
What I need to do is create a button that can get the user back to the top of the page.
But I've failed to do that and I've failed to find info about it.
If someone can explain me or direct me towards the solution I'd be highly thankfull.

thank's in advance.

Move MC With AS - Two Way?
Hi friends..

It Simple but..i think i'm overlooking somethin..!!

Im trying to move a MC horizantally (i.e x-axis) from left to right; i want to change direction once it touches border at right side and vice versa!!

Thanx in advance

Ok A New One _x Move.
Ok a new one, what is it that's rong with this code. I have wrote it to try and make this this (mc) move from up and then down on the _y axes. It moves alright ,I cant figure out why it won't move the other way. Put this on a movie clip and it will move on the stage but it won't move up, have i got the - +'s mixed up!!??

onClipEvent (enterFrame) {
if (_y<=340) {
s = true;
if (s) {
_y += 5;
} else if (!s) {
_y -= 5;
}
} else if (_y>=400) {
s = false;
}
}

[Edited by Jaffasoft on 03-21-2002 at 03:23 AM]

X Move
Hi,

How can I declare a variable, which for each "_x" or "_y" move of an MC, makes another one doe the same.


Thanx
Koen

Move Pop Ups
ok so i have the pop up window things right. like click on a button, a new window in flash opens up. what's the action script to click on the title bar and move the window? i use flash mx...i was also wondering how to do the close buttons on the title bars.
[Edited by [hxc]media on 09-26-2002 at 01:29 PM]

Move MC
Hello,

i have a MC and a Button in my stage.
i want the MC to move in the yy directon while the button is pressed and stop when the button is released.

How can i do this?

Thanks,
Miguel

Move Everything Down
Here is an interesting problem...only because I lost some hair and a few brain cells trying to figure it out..still haven't so I'm asking for some guidance. Here it is....

I have my flash movie with buttons and stuff on the stage. The entire stage is full from left to right and top to bottom. I have over 25 layers with everything imaginable. So someone says to add another item to the stage and add it to the top no less. So I increase the Movie demensions by another 50 Pixels to fit the other item. But when I increased the movie properties, the extra hight went to the bottom (From the bottom down). So I selected all and moved all the stuff down to make room. However..here is the problem..eventhough I selected all, and everything showed as if it were selected, not everything moved down.
In Firworks I can anchor the items on the stage either top, bottom, left or right. then when I increase the stage size, the items stay in place and the stage expands from the top, bottom, left or right.
In Flash, can I anchor everything and have the stage area expand from the top instead of from the bottom?

Sorry for the long explanation. I hope you didn't fall asleep reading it.

Move From One Mc To Another
Is it posible to move a movieclip from one movieclip to another movieclip?

How?

On Key Move Help
I asked a question about 2-3 weeks ago about how to make a ball move: left, down, right, and up. I asked if someone could give me complete details, step by step. I'm wondering if someone could do that for me since no one really did last time.

also, this link was given to me... what it means i have NO idea

http://www.kirupa.com/developer/mx/images/loadBar.gif

Move To The Right
I used this code to make my spaceship move, and shoot. But he doesn't moves to the right, but I did added the code to move it to the right...



onClipEvent(load){

moveSpeed=10;
_root.laser._visible=false;
laserCounter=1;
scrollx=_root.mainGround.ground._width/3;
scrollStart=false;

}




onClipEvent (enterFrame) {

if (Key.isDown(Key.CONTROL)) {

laserCounter++;
_root.laser.duplicateMovieClip( "laser"+laserCounter, laserCounter );
_root["laser"+laserCounter]._visible=true;
}


if (Key.isDown(Key.RIGHT)) {
if (this._x<scrollx){
this._x+=moveSpeed;

} else {
scrollStart=true;
}

} else if (Key.isDown(Key.LEFT)) {
this._x-=moveSpeed;
}

if (Key.isDown(Key.DOWN)) {
this._y+=moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y-=moveSpeed;
}

}


onClipEvent (keyUp) {
if (Key.getCode() == Key.RIGHT) {
scrollStart=false;
}
}

Move The MC
here's the situation:

There's 3 MCs, which loaded with image using XML. I need to move the MC one by one. After the 1st MC move and stop at the target area, it pause for a second, and the 2nd MC move to the target.
this is the script:


Quote:





for (var j = 0; j<Cred.length; j++) {
blank["blank"+j].container.loadMovie(blank["blank"+j].menuImg);
}
// this script to move the MC
for (var k = 0; k<Cred.length; k++) {
_root.permission = false
blank["blank"+k].onEnterFrame = function() {
currentlocy = this._y;
differencey = targety-currentlocy;
accely = differencey/4;
this._y += accely;
};
// this script to pause
if (_root.permission==false) {
time.gotoAndStop(2);
}
}






the fact is The MCs move together not one by one. anyone know how to solve this problem ?


Thanks in advance

How To Move Img From Right To L
I have like, a serie of 30 images, in a movie.. and i wanna make them rotate from left to right as the mouse moves. When I move the mouse right lets say, the frames should go right, and the same when I move to left. Does anyone know how to do this? plz help, I gotta finish this work for tomorrow.
Max.

I Can Move It But Not The Way I Want...
I made the file below to show what I mean. It easier to see instead of axplaining..

but a little explaination:

if you click one of the buttons (red ones) the bar above should move to the number you clicked at. I can move it one way...but I can't reverse the move...

please help me out..

thnx

I Can Move It But Not The Way I Want...
I made the file below to show what I mean. It easier to see instead of axplaining..

but a little explaination:

if you click one of the buttons (red ones) the bar above should move to the number you clicked at. I can move it one way...but I can't reverse the move...

please help me out..

thnx

Move A MC
Does anyone understand how to write a script to move a MC like www.lennykravitz.com site?

Mc Won't Move
k i am making a preloader for my huge file i am making and the guy won't move when i press the arrow keys i put a/s on him but he won't move could it have to do with the 2 frame style preloader iw ill attach the preloader in mx and mx2004 please help and thanks
here is mx2004

Mc Move With AS
How can I make a mc move from right to left and then back to its current position?
I want the mc to move when I move the mouse over something

if(this.hitTest)
move left to a given point
}else{
move from current position back to original position

Do I need to set a boundary for the mc not to pass? Also how do I tell flash what the orignal position of mc is.

Move My Mc
I got some help from andross_88 on moving a mc across the stage with action script.

code:
myMC.speed = 5
myMC.onEnterFrame = function () {
this._x += this.speed
}


How would I give that same script a starting position and an ending position for my mc, and then be able to loop it?

Any help would be greatly appreciated! I am mushing out my brain trying to figure it out....

How To Move Mc's Up Then Down Then Up?
This might not be as easy as it sounds, maybe it is. I have numerous mc's and they are all duplicated and moving in the x direction, one right behind another, from left to right, like cookies on a conveyor. Well, when the first mc reaches a point or touches another mc, I want it to move up, then the following mc behind it, I want to move down, then the following back up again, this continues until no more mc's are left. I can't think of the best way to do this. I thought of adding code to the mc's to check to see if var move is "up" or "down" then moving y either += or -= when it has the hitTest with the mc where I want it to move up or down, but how do I control the up or down variable automatically? Any help? Thanks.

Move
leftMouse = scrollmask_oc._x;
rightMouse = scrollmask_oc._x+scrollmask_oc._width;
topMouse = scrollmask_oc._y;
bottomMouse = scrollmask_oc._y+scrollmask_oc._height;
leftClip = scrollmask_oc._x;
topClip = scrollmask_oc._y;
rightClip = scrollmask_oc._x+scrollmask_oc._width-oc._width;
bottomClip = scrollmask_oc._y+scrollmask_oc._height-oc._height;
oc.onEnterFrame = function() {
var rx = (_root._xmouse-leftMouse)/(rightMouse-leftMouse);
var ry = (_root._ymouse-topMouse)/(bottomMouse-topMouse);
rx = Math.max(0, Math.min(1, rx));
ry = Math.max(0, Math.min(1, ry));
var dx = leftClip+(rightClip-leftClip)*rx;
var dy = topClip+(bottomClip-topClip)*ry;
this._x += (dx-this._x)*.3;
this._y += (dy-this._y)*.3;
};

This script makes a picture move under a mask when you move your mouse around the screen, the only problem is when you move the mouse to an object its hard to click because the picture just keeps moving up, so how do you make the picture only move if you put the mouse to the very edge of the picture or mask?

Move A Pic
I have been searching here and my eyeballs hurt so I will post.
I want to be able to go over a pic(example) Mouse over,click and hold down your mouse and move you object around and when you release it will stay there

How Do They Do That Move ?
This is by far the most beautiful site i have seen. I am really curious about the paper animation.? is it done picture-by picture in keyframes or in another animation program ? If yes which ?

Thanks in advance !

/Thomas

Best Way To Move Something
Hello all,

As I have learned more and more about flash, I have come to realize that there are many methods one can take to acomplish the same thing. For example, if I want 'ball' to move across the screen i could either do a setInterval(moveBall, time) where the function moveBall moves the ball by some amount each 'time' milliseconds. Another way to move the ball would be to place 'ball' in another movieclip, and have actionscript on frame 2 move the ball by some amount, and then loop back to frame one.

My question is, as far as flash cares does it matter which method I use? Is one easier or harder on the processor? Any related observations or comments on this subject would be most welcome.

Thanks!

To Move Across
This will add a scrollbar and move text up and down, but how can I add another scrollbar so there is a horizontal one as well. I tried this but it failed.

this.createClassObject(UIScrollBar,"csbScroller",t his.getNextHighestDepth());
csbScroller.setScrollTarget(txt2);
csbScroller.setSize(csbScroller.width,txt2._height );
csbScroller.move(txt2._x+txt2._width,txt2._y);

//didn't work
//csbScroller.setSize(csbScroller.height,txt2._width );
//csbScroller.move(txt2._x,txt2._y+txt2._height);
//csbScroller.horizontal=true;

Mc1 Move Towards Mc2
Hi!

I need a mc (mc1) to move towards another mc (mc2) getting "mc2"'s _x and _y
automaticly...
Anyone got an idea of how this can be done?

If i didnt explain good enough, just tell me, and ill try again..

Thanks...

Move A MC
i want a movie clip to move to a certain X,Y postion when a button is click - what would the action script be for that to happen - it dows not need to animate - but can just change its position.

thanks in advance!

Please Help...so I Can Move On
Hello,
I need a big favour would someone be able to look at my .fla and help me with it. I have a read and used various tutorials, it may be something simple to someone who knows what they are doing? I can't continue with my design til I get this first bit sorted and I've been stuck on it for ages!

Basically I have a preloader in 1st scene. In the second scene I have a mc which is a photo ( i am gonna build on this later). I have used a parralax script on the movie so it moves with the mouse, but I can't get it to stop exactly at the edges of my photo mc? Also I can't get it to move vertically? The other thing is i have a script that when the user clicks on the image it zooms in but that does not work at the mo?

I understand you are all very busy but I'm desperate and would really appreciate the help on this one..... i promise I'll leave you alone for ages when this is sorted ha ha. The .fla is at http://www.sussexexboxers.com/movie.zip Thanks again

Move X Then Y
Hi, I'm trying to use this code to move a movieclip


Code:
this._x += (goalX - this._x) / 5;
this._y += (goalY - this._y) / 5;
I am able to get it to move to a position by defining goalX and goalY.. simple enough.

however, what I have trouble figuring out is.. How can I move it on X axis first then Y axis on a button release.

Also, is there a way to set an array of x,y coordinates and get the movieclip moving along all the coordinates in an order?

thx

Move Across
This will add a scrollbar and move text up and down, but how can I add another scrollbar so there is a horizontal one as well. I tried this but it failed.

this.createClassObject(UIScrollBar,"csbScroller",t his.getNextHighestDepth());
csbScroller.setScrollTarget(txt2);
csbScroller.setSize(csbScroller.width,txt2._height );
csbScroller.move(txt2._x+txt2._width,txt2._y);

//didn't work
//csbScroller.setSize(csbScroller.height,txt2._width );
//csbScroller.move(txt2._x,txt2._y+txt2._height);
//csbScroller.horizontal=true;

How To Move Sth
how can I make the circle free walking and when toches the box for example on the left side and push the right button it moves with the circle then If I push the left button the box wouldn't move with the circle... is it possible?
I need the code for the left, right, up and down buttons...

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