So long now… 5 months at hte most ive been trying to make something similiar to the korn website www.korn.com how the guy runs back and forthw it the mouse and turns and ****… and the background scrolls with the movie… and i cant figure the **** out… please someone help me.
hi there
i think this is made with frame by frame animation which means ,you make a movieclip containing the “man” and use another for background movement,there are some tutorials here on kirupa about continuous movement and some about creting traiing mouse i don’t knowthe links right now but if ou search you’ll find it and i think that’s what you need
no ive looked did not exacly have what i need
What i need is a code so that if i move the mouse right the background goes left of course, and if i go left with the mouse the background goes right… i can figure out how to make the character go both directions with no problems ive gotten so close to making this site but im still having trouble.
btw ive posted this same stuff on flash kit, newgrounds, and other forums and no one has ever been able to help me, my guess is cause no one else has been able to do scripting as such. but oh well.
I have made something similar to that before, except I had the guy continuously walking and then if you clicked the mouse, he would come the other way.
Make a movie clip of him walking, and nest that mc inside another mc. Have him walking left to right on one frame. Copy the “walk” mc to another frame and flip horizontal. Then on a third frame in the mc, have him standing still. All3 of these frames should have stop actions. Get it?
So you have :
- Main mc (“guy”)
- In “guy” you have three frames with the stop actions and mc’s arrange as explained.Left to right on frm 1 stopped on frm 2, and right to left on frm 3.
On “guy” you can use “if” statements with reference to the mouse pos. ie:
//make him walk from right to left
if(_root.xmouse<_root.guy._x){
_root.guy.gotoAndStop(3);
}
//make him walk from left to right
if(_root.xmouse>_root.guy._x){
_root.guy.gotoAndStop(1);
}
//make him stand still
if(_root.xmouse==_root.guy._x){
_root.guy.gotoAndStop(2);
}
I’m not sure if my syntax etc is correct but you should get the basic idea, and then obviously expand on this . .
Hope it helps !
Take note!!
The code above does not makehim respond to mouse clicks, only the position of the mouse!!
thats kool so when he walks does the background move also kinda like the korn site?
im gonna try it.
and how do i set the background up… like take the backgroumd image duplicate and put it side by side then group?
that code didnt work
I said it was a <b>rough idea</b> of how the code should work, you will have to tweak it . . . .
As for the background it would work in a similar way . .
Also remember to give instance names for you mc’s
The background would work the same way except you’d put a minus sign for the xpos, since when you walk right the background scrolls left…
And yes rages you are right what you must to to creat the infinite background is actionscript 2 same background side by side so that the background is always cover, then unload one when it is out of vison and load the other on the other side…
mind giving a sample code, i can perhaps work with it from there
Hey,
I read your first post last night when I was at work. I’m gonna try to make something similar. This is the background, so far. It’s the code from the infinate menu tut (thanks pom!), but it stops when the movieClip reaches a certain point instead of repeating. I put the buttons in the movieClip like the Korn site, but they don’t do anything (yet…).
I’ll keep working on it because I don’t know if I can do it or not.
New challenge!!(-:
Wow…That’s a bit harder than I had imagined in my head. Well, this is what I came up with. The animation sucks, there’s no sugar-coating that one, but I think you’ll get the idea of how the code works. The code is pretty self-explanitory. I hope this helps!
(-:
Nice one Freddy!!!
That’s what I was trying to do . . .
Thanks Dave!
Too bad he’s walking around like that Jar Jar Binks guy…
;(
Cool Freddy,
It’s the same way I try and work.
Rather get all the code working then worry about animation details . . .
Star Wars critics did always say what a fool jar-jar looked like
Smiley intended for last post . . . .
Davehead…
try editing your posts instead of making a new one…
thanks,
Rev