-=Move Movie Clip=-
Although this should be a breeze for someone such as myself... I can't seem to get a certain aspect to work...
I need to basically move/duplicate a currently existing movieclip into another dynamically created movieclip. All attempts thus far have failed
:::::::::::::::::::::::::::::::: I tried a general duplicate movie clip method.
== duplicateMovieClip("Close", "CloseButton", eval(WindowName+".TitleBar")); ==
This faultered as the duplication just occured on the root -_-
:::::::::::::::::::::::::::::::: I even attempted creating a null movie clip in one of my layers then swaping depth.
== eval("_root."+WindowName + ".TitleBar").createEmptyMovieClip("closeholder ", 1); Close.swapDepths(eval(WindowName+".TitleBar.closeh older")); ==
In this case I'm probably using [and understanding] depths incorrectly. Basically I assumed depth/target/object were interchangable as in specification of a path... or a general depth.
:::::::::::::::::::::::::::::::: Any idea's on moving my movie clip around throughout other dynamic movieclips/objects? Im thinking I MIGHT have to specify the path as a variable then eval the var to associate properly... hmm.
Thanks in ahead,
~Zeth
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-12-2003, 05:20 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
A Button Inside A Movie Clip To Move Another Movie Clip
I'm building a web page and I have a button that I need to make two movie clips play. The button is inside one movie clip and in addition to it playing I want it to make another movie clip play. It doesn't seem to recognize the movie clip target names. Any help as to how this can be done would be much appriciated.
Thanx
Move Movie Clip On Button Clip
This is a script that causes a movie clip to move down to a new location when a button nested inside the movie clip is released. can anyone tell me how to write the code so that when a different button is pressed the movie clip will move back to its original position. I am trying to learn actionscript 2.0 by taking the posted files apart and so on, I have a ton o books none of which are too helpful so I could really use some help. What the heck is "ty". I decided to join the forum because books were not cutting it! LOL
here is the code thanks.
ActionScript Code:
// this is the main button to start the slide show
collButtHolder.slide1.onRelease = function() {
//move the to menu down to reveal the slide show components
slide(collButtHolder,324);
// call the function to set up slide show or reset it you had other buttons
// this is where you set your path to the photos and how many photos are in that folder.
resetSlideShow("images/slide1/", 15);
collectionMenu.bName.text = "slide1";
};
function slide(mc, ty) {
mc.onEnterFrame = function() {
mc._y += (ty-mc._y)/5;
if (Math.abs(ty-mc._y)<0.4) {
this._y = ty;
delete mc.onEnterFrame;
}
};
}
Having A Button Inside A Movie Clip To Move The Root Movie To Another Frame?
i dont know much about actionscripting so explain to me in simple terms...
i have buttons inside a single movie clip and i want to have each button (when clicked or rollover-ed) move the frame header of the main (root) movie to another position. what actionscript does this require? and will each button actually be "clickable" since they're all encapsulated in ONE movie clip??
thanks
How Do I Move Movie Clips When A Drag Object Is Over/between 2 Movie Clip
Hi Folks,
I have a Drag and Drop Exercise. 6 Drag Items and 2 Drop Locations.
What I want is when there are 2 drop items/movie clips already on stage and you Drag the 3rd Movie Clip INBETWEEN 2 Existing Movie Clips, the 2nd Movie Clip shifts down and a place is created for the 3rd Movie Clip.
Source file FLA attached, Saved as Flash 8 From CS3
Thanks
RG
http://www.4shared.com/file/24611229...055_ForEE.html
How Do I Move A Whole Movie Clip?
I was working on a movie, and I inserted a movie clip. The movie clip was cut in on the wrong place on the screen, and I wanted to reposition it, but I donīt know how to move all the frames to the exact same position on the screen!
Can somebody please help me?
I Want To Move My Movie Clip
using the kerboard arrows,(mouse if possible), and keyboard letters!
how can i do it?
can i do it using onClipEvent(keyDown)?
if ys then how?
thanks in advance
Peleg
Movie Clip Won't Move
Hi all,
I'm trying to dynamically create movieclip instances with attachMovie(). The problem is, I'm trying to change the position with the _x and _y properties and it doesn't work. The movieclip appears on the stage but the position remains 0,0. Here's my code:
attachMovie("radioButton", "radioButton1", 2);
radioButtion1._y = 10;
radioButtion1._x = 10;
Like I said, the clip won't move. I've tried to change other properties, like _width, without problems. So, if anyone knows what I'm doing wrong, I'd appreciate some help.
Thanks,
Makac
Move Movie Clip
Hi,
I want to start a movieclip ( travel) or graphic, but i guess a movieclip is better, from one place move to another. The starting point is variable (a land on the worldmap) the destination is steady (Amsterdam, The Netherlands). The worldmap is a movieclip, countries are buttons). So the user clicks a country as a starting point.
Does anybody how to do this?
Help will be nice.
Thanx
FD
MOVE One Movie Clip To Another Mc
Hello
With the click on one button, I want to MOVE a specified movie clip "ARROW" to another "mc". Then with the click on the next button I want "ARROW" to slide close to another "mc". And so on in the same form.
I have no idea about this slide/movement script.
If this is very difficult, the more easy possibility might be to tell "ARROW" go to this x/y coordinates.
Can you tell me how?
Thank you.
Tito.
Movie Clip Move
Hi all,
I have tried everywhere looking for a fix for this code. I am looking to have mulitable buttons which when pressed, will move a movie clip to a specific point 1. If the movie clip is aleady at that specific point... it will move to specific point 2.
Ok... here is an example of what I am talking about.
On the button the action is this:
on (press) {
_root.over = true;
}
Which sets off the script on a movie:
onClipEvent (enterFrame) {
if (_root.over_y = 400 {
_root.over_y = 200;
_root.over_x = 200;
ydif = (_root.target._y-_root.over_y)/10;
xdif = (_root.target._x-_root.over_x)/10;
_root.target._y -= ydif;
_root.target._x -= xdif;
_root.over02_y = 50;
_root.over02_x = 50;
ydif = (_root.target02._y-_root.over02_y)/10;
xdif = (_root.target02._x-_root.over02_x)/10;
_root.target02._y -= ydif;
_root.target02._x -= xdif;
}else{
_root.over_y = 400;
_root.over_x = 400;
ydif = (_root.target._y-_root.over_y)/10;
xdif = (_root.target._x-_root.over_x)/10;
_root.target._y -= ydif;
_root.target._x -= xdif;
_root.over02_y = 200;
_root.over02_x = 200;
ydif = (_root.target02._y-_root.over02_y)/10;
xdif = (_root.target02._x-_root.over02_x)/10;
_root.target02._y -= ydif;
_root.target02._x -= xdif;
}
It pretty much works except the important line: if (_root.over_y = 400 { What I am trying to say here is if the y point of movie clip 1 is 400, then do whats under. Else do the other thing.
Any ideas? Thanks in advance.
Please Help My Movie Clip Move The Right Way
Hi!
I have attached the file that I'm having problems with!
I would like my class to type the answer to the calculation in the box provided. If they get the answer right, the mouse should jump a little way up the hill and start to slide slowly back down again.
The sliding down part will act as a bit of a timer for the next question (the longer they take to answer, the further the mouse will have slipped back down the hill!)
I realise I have made the movie clip of the mouse incorrectly, as he slides up hill to his final place instead!
How can the children click 'CHECK' and the computer will jump the mouse 120 frames forward to his first jump point?
Also, how can it be animated so it slides slowly back down again?
Hope this makes some sort of sense!
Cheers
Chris
How To Move A Movie Clip On The X
I've looked through a number of posts but can't quite find what I am looking for. I have a movie clip that is a timeline that I would like to have move from one point to another on the x axis when a button is pushed. The idea being when button 1 is clicked the movie clip moves to position 1, then when button 2 is clicked the movie clip advances to position 2...etc. What script would I use to accomplish that?
Thanks for the help in advance
Move A Movie Clip
I am trying to get my movie clip to go from point "a" to point "b", but I am not having any luck.
ActionScript Code:
cd.onEnterFrame = function (){
this._rotation -=30; //sets the rotation of the movie clip
if (this._x<100) {
this._x -=20;
}
}
Help Need To Move A Movie Clip
I Need help moving a movie clip in a wave movement ( like the sin or cosine waves we learned in school). I have a movie clip called "bird". I am trying to write action script to the main movie and control the movie clip "bird" with the bird._x and bird._y. It is moving fine from left to right but the up and down motion is not working correctly. May be I need to put it in a loop or something. I am not sure what I am doing wrong. Any help will be appreciated.
Thanks,
Edo
Help Need To Move A Movie Clip
I need to move a movie clip with action script. I am not sure how to do it. I am writing action script to one of the layers and calling my movie clip "bird". I want to move the clip in a wave motion(like a sine wave). I am using the bird._x and bird._y and setting them equal to a variable. But the _y part of it is not moving. The movie clip is only moving from right to left and there is no upward or downward movement. I am stuck and would appreciate any help.
Thanks,
edo
Move My Movie Clip
Hi there!
Hope u all had a nice holidays!
I have a button in my movie clip. This same button is located down in my movie clip. Once this button is pressed, you reach another frame from the same movie clip but at the same hight of the button.
How could i direct the user to the top of the movie clip after pressing the button? And not keep the same "hight" of the button.
Cheers.
Leo.
Need Movie Clip To Move Up And Down
Hi everyone,
I have a movieclip on the main timeline and would like it to move very slowly up and down on a continuous basis. I'd like to use actionscript to do this instead of tweening on the timeline. The only actionscript I can think of that might work is using the _y property but I don't know how to construct the full actionscript to make it work. Can someone help out?
Thanks for any help offered.
Help Need To Move A Movie Clip
I need to move a movie clip with action script. I am not sure how to do it. I am writing action script to one of the layers and calling my movie clip "bird". I want to move the clip in a wave motion(like a sine wave). I am using the bird._x and bird._y and setting them equal to a variable. But the _y part of it is not moving. The movie clip is only moving from right to left and there is no upward or downward movement. I am stuck and would appreciate any help.
Thanks,
edo
Movie Clip Move To Position
hi, i have just made a few buttons lined up verticaly, now what im tring to do is on mouse over have a floating movie clip move over the button, please have a look at fla attacted and tell me where im going wrong
thanks brian
Making A Movie Clip Move
This is probably a no-brainer for most, but I made a movie clip of a set of eyes, and I want them to blink... like, every 30 frames. So I double-clicked the movie clip symbol, which brought me to the clip's own seperate timeline. There, I made the animation of blinking eyes just like I wanted it. But when I go back to the main animation, the movie clip doesn't animate... it just stays there on the first frame.
Could somebody tell me if there's a way to activate the clip?
I'm using Flash MX, if that is useful info.
Mouse Over +movie Clip Move
ok this one might need some explaination
on some site they have for instance a mouse(rodent not computer)
and when the computer mouse goes over it. it moves to a differnt spot
the effect is you cant catch it.
does anyone know who to do this
www.royaltenenbaums.com
thanks
Move Certain According To Distance From Movie Clip?
okay what im trying to do is to have a series of clips - when i mouse over one the others move according to their distance from the moused over clip - the closer they are the further they move - the further they are the less they move.. does anybody have any idea where i can find a tutorial to do this - or any ideas to get started - i tried starting but my coding skills I dont think are up to it yet.. any help much appreciated.. ive seen this kind of thing done with text (sort of but more complex)
attached is a gif showing what i want. - imagine you mouse over the red circle!
Make A Movie Clip Move?
Ok, I'm sure this is probably alot easier then I am thinking, but I'm puzzled just the same.
I just got Flash MX 2004 and I'm trying to have a really long movie clip re-position itself when I click a button. I'll have three buttons and I want each button to slide the movie to a certain location on the movie clip and stop. Then, when you click on a differant button, it will move the movie clip to a differant location on the movie clip.
I know this is probably pretty standard stuff, but I can't seem to figure it out. I've read several tutorials, but none of them really explain what I am trying to figure out.
Little Help???
TM
Movie Clip Wont Move
i have this code (only)
Code:
if (Key.isDown(Key.LEFT)) {
Word._x -= 5;
} else if(Key.isDown(Key.RIGHT)) {
Word._x += 5;
}
plus gotoandplay(1) on the next frame
for some reason, when I press left it will move left 5 spaces and stay still until i let go, when it will move back to where it originally was
same with right
i have no idea what is wrong
Move Movie Clip With Button
Hi.. i woould like the script for a button that moves a movie clip say 5 pixels across each time its hit.
any ideas?
HELP PLEASE...move A Movie Clip By Averages...
In flash, I am trying to get a movie clip/object to move to the average between two other objects. In other words, I have dot A (pa) and dot C (pc) and as I move them, I want dot B (pb) to be dead center of the two...can anyone help me figure out how to do this? Here is the script I have so far, and commented out on the bottom is the formula I need, but don't know how to get to work:
pa.onPress = function() {
this.startDrag(false,
_root.groove_1_mc._x,
_root.groove_1_mc._y - 382,
_root.groove_1_mc._x,
_root.groove_1_mc._y);
};
pa.onRelease = function() {
stopDrag();
};
pc.onPress = function() {
this.startDrag(false,
_root.groove_2_mc._x,
_root.groove_2_mc._y - 382,
_root.groove_2_mc._x,
_root.groove_2_mc._y);
};
pc.onRelease = function() {
stopDrag();
};
var pax = pa._x;
var pay = pa._y;
var pcx = pc._x;
var pcy = pc._y;
var cax = pcx - pax;
var cay = pcy - pay;
this.createEmptyMovieClip("cnt", 1000);
cnt.lineStyle(2, 0xFFFFFF, 100);
cnt.moveTo(pa._x, pa._y);
cnt.lineTo(pc._x, pc._y);
cnt.lineTo(pa._x, pa._y);
cnt.moveTo(pa._x, pa._y);
//pb.y (green dot) needs to be equal to the y axis of pa (left red dot) plus the y axis of pc (right red dot) divided by 2
//pb.y = (pa._y + pc._y)/2;
//pb.x (green dot) needs to be equal to the x axis of pa (left red dot) plus the x axis of pc (right red dot) divided by 2
//pb.x = (pa._x + pc._x)/2;
[CS3] Using OnEnterFrame To Move A Movie Clip...
Hey guys, my objective here is to move a movieclip across the stage with a variable speed. I don't want to ease it, I wasnt linear movement... Anyways this is how I normally do it, but it's way to fast
Quote:
_root.mcTarg = 400
mc.onEnterFrame = function()
{
var tX = mc._x + ((_root.mcTarg - mc._x))
mc._x = Math.floor(tX)
trace("t "+_root. mcTarg+" "+ mc._x)
}
If I do:
Quote:
var tX = mc._x + ((_root.mcTarg - mc._x)/10)
Notice the "/10" then my mc's x value will never actually go to the target value.
OnPress Move Movie Clip
Thanks in advance.
I have the following button...
button3.onPress=function(){
object_mc._x = 98.50;
object_mc._y = 394.50;
}
Telling the object_mc to go to x and y points. I am trying to define 4 different point and then for the button to send the object_mc to one of those points randomly.
I am trying
var objectLocation1:Number (){
object_mc._x = 98.50;
object_mc._y = 394.50;
}
var objectLocation2:Number (){
object_mc._x = 148.00;
object_mc._y = 190.00;
}
var objectLocation3:Number (){
object_mc._x = 258.00;
object_mc._y = 290.00;
}
and then shuffle the variables
order = ['location1', 'location2', 'location3'];
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}
function shuffle(array){
return randRange(0, (array.length - 1));
}
myVar = order[shuffle(order)]
Is there a better way ?
Thanks once again !!!
Flash 5: Move A Movie Clip
Howdy, my brother asked me to make him a button for his website. When I found out i could only make a button template in flash 5 I quickly instaled it and began working. Now here is my problem. He wants it so that when the mouse hovers over the button it will slide out. I am thinking that this should be done with actionscript so that it can slide out when the mouse is on it and slide in when the mouse leaves it. Is there anyway to move a movie clip with actionscript?
My other question is: is there an actionscript comand that will make flash wait for x time before it moves on to the next comand
Move Movie Clip Via Actionsctipt
I have searched many threads but have not found what I'm looking for. What I would like to do is on a button press move a movieclip to a specified point. Then when the same button is pressed move the movieclip to its original position. My ultimate goal is building a navigation similar to that seen on http://www.24-7media.de. Thanks!
Ryan
Move A Movie's Parent Clip
I have checked around and have had this problem before. I realize it maybe odd but what I am trying to do is move a movieclip to a different _parent without using a linkage identifier.
For example I have a movieclip on the stage that was made at authoring time and it is at level0.my_mc...it does not have a linkage identifier. I am trying to move the movieclip to a different parent such as level0.myNew_mc.my_mc is this possible?
HELP PLEASE....move Movie Clip Using Averages
In flash, I am trying to get a movie clip/object to move to the average between two other objects. In other words, I have dot A (pa) and dot C (pc) and as I move them, I want dot B (pb) to be dead center of the two...can anyone help me figure out how to do this? Here is the script I have so far, and commented out on the bottom is the formula I need, but don't know how to get to work:
pa.onPress = function() {
this.startDrag(false,
_root.groove_1_mc._x,
_root.groove_1_mc._y - 382,
_root.groove_1_mc._x,
_root.groove_1_mc._y);
};
pa.onRelease = function() {
stopDrag();
};
pc.onPress = function() {
this.startDrag(false,
_root.groove_2_mc._x,
_root.groove_2_mc._y - 382,
_root.groove_2_mc._x,
_root.groove_2_mc._y);
};
pc.onRelease = function() {
stopDrag();
};
var pax = pa._x;
var pay = pa._y;
var pcx = pc._x;
var pcy = pc._y;
var cax = pcx - pax;
var cay = pcy - pay;
this.createEmptyMovieClip("cnt", 1000);
cnt.lineStyle(2, 0xFFFFFF, 100);
cnt.moveTo(pa._x, pa._y);
cnt.lineTo(pc._x, pc._y);
cnt.lineTo(pa._x, pa._y);
cnt.moveTo(pa._x, pa._y);
//pb.y (green dot) needs to be equal to the y axis of pa (left red dot) plus the y axis of pc (right red dot) divided by 2
//pb.y = (pa._y + pc._y)/2;
//pb.x (green dot) needs to be equal to the x axis of pa (left red dot) plus the x axis of pc (right red dot) divided by 2
//pb.x = (pa._x + pc._x)/2;
Move A Movie Clip To Coordinates
I'm trying to get a movieclip to position itself when clicked; so that wherever the exact spot I click on it, that spot moves to the coordinates x:300 y:250. For example, If I click the bottom left corner, then the movie clip re-positions itself so that so that the bottom left corner is at x:300 y:250. Any idea how should I approach this?
Movie Clip Doesn't Move
hello, i returned to flash but have some elementary problems, so much time. ehh.
I created movie clip with some motion tween. In edit mode it's moving nice, but when play this movie on scene 'top level' it doesn;t. There are other symbols in scene and they're moving how I want (they have defined motion tweens in main timeline).
What I need to do, if the movieclip needs to play (like it's defined in its internal timeline) in main timeline ?
greets.
When Key Pressed, Movie Clip Move To....
Well im stuck on this one code for my game, the thing i need is: ok when someone pushes the UP key, i need a movie clip to move at a certain speed to a certain _y point [300 for example]. So if anyone could help me with this, it would be much appreciated, if you dont understand what im asking then tell me and i'll refrase it into a way you can understand it better.
Thank You in advance.
Movie Clip Doesn't Move
hello, i returned to flash but have some elementary problems, so much time. ehh.
I created movie clip with some motion tween. In edit mode it's moving nice, but when play this movie on scene 'top level' it doesn;t. There are other symbols in scene and they're moving how I want (they have defined motion tweens in main timeline).
What I need to do, if the movieclip needs to play (like it's defined in its internal timeline) in main timeline ?
greets.
How To Move From From A Movie Clip Tp Scence 1
Yeah i kinda have this small problem. Im running a series of frames in scence 1 right then at a certain point i make it stop (say scence 30) to make it run in a movie clip. Question, how do i make after it finish running the movie clip, continue where it left off in scence 1 (which would be frame 31)
thanks for the help
HELP PLEASE...move A Movie Clip By Averages...
In flash, I am trying to get a movie clip/object to move to the average between two other objects. In other words, I have dot A (pa) and dot C (pc) and as I move them, I want dot B (pb) to be dead center of the two...can anyone help me figure out how to do this? Here is the script I have so far, and commented out on the bottom is the formula I need, but don't know how to get to work:
pa.onPress = function() {
this.startDrag(false,
_root.groove_1_mc._x,
_root.groove_1_mc._y - 382,
_root.groove_1_mc._x,
_root.groove_1_mc._y);
};
pa.onRelease = function() {
stopDrag();
};
pc.onPress = function() {
this.startDrag(false,
_root.groove_2_mc._x,
_root.groove_2_mc._y - 382,
_root.groove_2_mc._x,
_root.groove_2_mc._y);
};
pc.onRelease = function() {
stopDrag();
};
var pax = pa._x;
var pay = pa._y;
var pcx = pc._x;
var pcy = pc._y;
var cax = pcx - pax;
var cay = pcy - pay;
this.createEmptyMovieClip("cnt", 1000);
cnt.lineStyle(2, 0xFFFFFF, 100);
cnt.moveTo(pa._x, pa._y);
cnt.lineTo(pc._x, pc._y);
cnt.lineTo(pa._x, pa._y);
cnt.moveTo(pa._x, pa._y);
//pb.y (green dot) needs to be equal to the y axis of pa (left red dot) plus the y axis of pc (right red dot) divided by 2
//pb.y = (pa._y + pc._y)/2;
//pb.x (green dot) needs to be equal to the x axis of pa (left red dot) plus the x axis of pc (right red dot) divided by 2
//pb.x = (pa._x + pc._x)/2;
Move Movie Clip To Mouse Position
can anyone help,
i'm still very new to actionscript, and i need a script that i can use to move a movie clip so that it moves to the position where the mouse has clicked.
i hope that makes sense.
Can't Move A Movie Clip To My Cursor Position
I've got a movie clip that is used as the mouse. In the first frame of the clip is a button, So basically its a button that is always dragged around with the mouse. There is also a separate movie clip on the screen. I want to make it so that when the button is clicked, the movie clip will move to wherever the button is. I can only get it to instantly appear where the button is and I want to make it actually move there. The actions I put on the button were to check which quadrant the button is in with relation to the movie clip with if statements. Then with a for loop, gradually change the x and y positions of the movie clip until it gets to where the button is. This code makes sense to me but it doesn't do what I want. The movie clip still instantly appears to the location of the button. Anyone got any ideas?
Want To Move A Movie Clip Along Y Only With Little Effect Of Elacticity
want to move a movieclip only in y axis
have draged a movie clip on main stag whose instance name is "mc1" ok
and in actionscript this i have put
onClipEvent (mouseMove) {
if (_xmouse<=200) {
_root.mc1._y = _root._ymouse;
}
}
with this i have divided the screen approximately into two halves when i move my mouse
in right half mc1 keepd still when i move the mouse to left half mc1 movies only along y axis this i want.
but with little more effects i.e when i move my mouse in left half mc1 comes straight under my mouse
i want it(mc1) to travel from last positon to new postion whith little effect of elasticity i.e give it a look that some short string is attached
helppppppp me
waiting anxiouly for ur relpy
bye
How Can I Attach A Movie Clip, Move It Across The Ge, Then Remove It?
I have a Flash movie with one scene. In Frame 20, I want to attach a movie clip at (272, 116). In Frame 34, I want it to have moved down to (272, 232). In Frame 35, I want it to disappear.
I understand using AttachMovie and RemoveMovieClip, but how can I get that movie clip to move across the stage before being removed?
Movie Clip Based On Mouse Move
Hi, they say you can go to Rome asking...
i want to be able to play a movie clip if i go right and play it backwards if i go left not the whole movie depending on the mouse position, does anyone know how that will give me a light or where i can find a fla like this? thanks
Plau Movie Clip On Mouse Move
Hi, they say you can go to Rome asking...
i want to be able to play a movie clip if i go right and play it backwards if i go left not the whole movie depending on the mouse position, does anyone know how that will give me a light or where i can find a fla like this? thanks
Move Movieclip By Hovering Over Another Movie Clip
ok i want to have a movieclip on screen that can be moved by hovering over other movie clips (like a down left right or up arrow)
i was able to get it to move it by one incriment with the rollOver, but i want it to keep moving as long as the mouse is over the clip (not just once)
i thought that i might be able to do it by creating a variable that is 0 whenever the mouse is nowhere important, and is either 4 8 6 or 2 if it is over the arrow in that direction (look at your number pad... 4=left, 6=right etc..), so on each arrow i have the code:
code:
on(rollOver){
_parent.dir=4;
}
on(rollOut){
_parent.dir=0;
}
and on the movie i want to be moved
code:
onClipEvent(enterFrame){
if (dir==4) this._x -=3;
else if (dir==6) this._x +=3;
else if (dir==8) this._y -=3;
else if (dir==2) this._y +=3;
}
however it does nothing when i run the clip... i think it is a problem with the variable not getting updated (or even initialized?) anyways can anyone help me? i am getting pretty frustrated with this
see the next message for the file i am talking about (in case my description wasnt clear enough)
thanks!
|