|
-
[RESOLVED] [MX04] help moving a mc through AS
i wanna put this code in a mc's frame, i need the mc to move 5 pixels each time it hits that frame, i thought of something like
but it didnt work, any help would be apreciated.
-
Senior Member
//rate is the speed it moves, where as end value is it's ending point
move_mc(mc_1, 120);
move_mc = function(ins_name, end_val) {
ins_name.onEnterFrame = function() {
if(ins_name._y < end_val) {
ins_name._y += rate;
} else {
delete ins_name.onEnterFrame;
}
}
}
rate = 5;
-
ill try that thx
-
dint work (probably coz o my shoody AS skill )
-
sry, found it, i just used
this. _x+= 5;
thx for help
-
Senior Member
LOL, that works too, I tend to use that if I wanna do something like a motion tween without frames. Good luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|