ActionScript 2.0 :: Make Character Face Mouse?

Dec 24, 2011

How would I go about doing this but not directly like 360. like lets say my mouse is to the left of the character the character would than face its left frame I made for him like lets say his left frame is frame 2.

View 8 Replies


Similar Posts:


Actionscript 3 :: Make Character Face Direction?

Jan 21, 2011

I have one character which can face several directions: t, b, l, r, tl, tr, bl, br.The type of camera is top-down 2d

T stands for Top, which is when he is looking to the top of the screen

B = Bottom
L = Left
R = Right

The character can look to other directions, like the Top-Left of the screen, which is tl

How do I calculate which direction he should look to if I only have one variable, rotation?

View 1 Replies

ActionScript 2.0 :: Make Charater Face Mouse Platform?

Aug 16, 2011

I have my as2 code for my game im making so far the char can jump and move left and right. make him face the mouse like lets say my mouse is to the x- of my character than I would want his left facing movie clip (which I havent made yet) to be facing that way etc. where I could start heres what I have:

Actionscript Code:
onClipEvent (load) {var ground:MovieClip = _root.ground;var grav:Number = 0;var gravity:Number = 2;var speed:Number = 7;var maxJump:Number = -12;var touchingGround:Boolean = false;}onClipEvent (enterFrame) {_y += grav;grav +=

[Code].....

That's the movement code that lets me move left and right and jump with gravity

View 2 Replies

Flash :: Using A Webcam To Put A Face On A Character?

Feb 24, 2011

I'm trying to accomplish something with flash but I'm having some problems, if not a solution I'm hoping someone can tell me a method and what I should read up on to do this: I want to have an image on the stage that has a gap the shape of a face in the middle of it, I'd then like to put a webcam feed behind it so people can line their face up in the gap and press a button to take a picture. (I've managed to put the webcam on the stage and take the picture but can't work out how to put it behind an image). Then I cant quite work out how I'd put the face onto a character I've drawn.

View 1 Replies

ActionScript 3.0 :: How To Get MovieClip To Face Mouse

Sep 17, 2009

I'm making a top down shooter and I'm encountering some interesting code lag with the function I'm using to make the player face the mouse.

Code:
//The function is called through a ENTER_FRAME listener.
//mX & mY are the current position of the mouse.
public function facePoint(mX, mY){
if(this.visible){
this.rotation = (-Math.atan2((this.x - mX),(this.y - mY))) * 180 / Math.PI;
}}

If I hold down two movement keys and then spin the mouse around the character really fast, it builds up some kind of buffer that sends the character out of control for a few seconds, even after you've released the keys. Just discovered that reducing the quality to low removes the issue entirely... so its a graphics problem. How to avoid this?

View 1 Replies

ActionScript 3.0 :: MC Rotate And Face Mouse With Tween

Oct 24, 2010

I'm trying to get a MC to rotate to face the mouse using tween:
Code:
import flash.events.MouseEvent;
import fl.transitions.Tween;
stage.addEventListener(MouseEvent.CLICK,clicks);
var tween:Tween;
function clicks(e:MouseEvent):void {
var dx:Number = mouseX-mc.x;
var dy:Number = mouseY-mc.y;
var angle:Number = Math.atan2(dy,dx)*180/Math.PI+90;
tween = new Tween(mc,"rotation",null,mc.rotation,angle,5);
}
While this works fine, there are certain clicks which make the MC pick the longer route to rotate.

View 2 Replies

ActionScript 2.0 :: Rotate A Movieclip To Face The Mouse Location

Feb 12, 2005

rotate a movieclip to face the mouse location

View 1 Replies

ActionScript 2.0 :: Make A Movieclip Of A Character And When The Character Is Dragg?

Aug 11, 2009

i was wondering if any of you out there could tell me how it is possible to make a movieclip of a character and when the character is dragged about the screen by the curser, how do you make the characters arms and legs swing about in a realistic fashion.

View 2 Replies

ActionScript 2.0 :: F8 Make Face Morphing Using DisplacementMapFilter?

Jan 13, 2009

Few days ago I uploaded my flash face morphing application and now I'm thinking of writing an article about creature process.URL... anyone curious about how I made it?

View 5 Replies

ActionScript 3.0 :: Make The Character In Flash Game Make A Jump When The Player Presses A Key?

Dec 19, 2009

i want to make the character in my flash game make a jump when the player presses a key,e.g. 'space',even the player release the key instantly,the character will still finish the complete jump process.

View 1 Replies

ActionScript 2.0 :: Make A Movieclip Face Another Movieclip?

Jan 22, 2009

I have found scripts to make them face the mouse, but when I try to tweak them to face another movieclip, they don't work.

For examples purpose make the MC: arrow face the MC: target.

View 14 Replies

ActionScript 2.0 :: Character Walking With Keys And By Mouse?

Sep 23, 2010

Wanting to be able to move multiple characters around a map (one at a time)First selecting them either by keyboard shortcut of by clicking them.then being able to move them with WASD of by clicking the mouse to a certain position on the map and the character would move in that direction.

View 1 Replies

Spinning Character Based On Mouse Movements?

May 26, 2011

So I'm designing a game for my flash class final, and I want to have my character spin based on mouse movements. So if I move the mouse to the left, character spins counterclockwise, to the right, clockwise. But I also need to have things spin with the character, like the gun he's holding. And if the gun shoots projectiles, how would I keep the direction of the projectiles constant with the character's direction? Also, I'm using wasd for walking, then the mouse for directional control, so how do I make it so W doesn't make the character go down in Y value, but it makes the character travel at a velocity in whatever direction it's facing (so if the character is facing like northeast, pressing W will make him walk northeast. Then pressing A facing the same direction would make him strafe northwest)?

View 1 Replies

ActionScript 2.0 :: Global Does Not Get Any Character Set When I Press Mouse?

Jan 6, 2003

on (press) {
/:klick = 1;
}

what does the /: do?? why is it necessary? couldnt u u use a _global.klick instead? (when i tried to change to global i used trace to see if it worked and the global doesnt get any character set when i press mouse..why is that? )

View 2 Replies

ActionScript 2.0 :: Create A Character Whose Head Will Follow The Mouse

Feb 17, 2009

I am trying to create a character whose head will follow the mouse. I have made a character whose eyes are following the mouse, but I would like the head to turn with the mouse as well - like the cyber pets here.

View 3 Replies

ActionScript 2.0 :: Make Character Have A Different Animation

Jun 26, 2010

So I'm making a platforming game, how do I make my character have a different animation for when he runs or jumps?

View 4 Replies

ActionScript 3.0 :: Make A Level That Follows The Character?

Jul 31, 2011

how would i make a level that follows the character? would it be a on enter frame event?

View 13 Replies

ActionScript 3.0 :: Make Character Go By Curve?

Feb 5, 2011

I got a curve(e.g. movieclip) which i want my character to go on when i press left/right arrow. How to make that?

View 2 Replies

Make Character Move Across Screen?

May 12, 2010

I've created a walk cycle using bone tool on a character but i don't know how to make it move from one part of the screen to the other. The character is made up of 6 layers, 4 of which are armatures and 2 have motion tweens.

View 1 Replies

ActionScript 2.0 :: Can't Make Character Jump?

Nov 14, 2006

I am creating a game in flash using spirte sheets of megaman and I have a problem setting up script to make him jump. I am able to have megaman run side to side and also shoot but I can not get him to jump. Here is a sample of my code:

var hspeed = 0;
var vspeed = 0;
var i = 0;

[code].....

View 3 Replies

Make An Enemy Bullet Go Towards The Main Character?

Oct 12, 2008

How would i make an enemy bullet go towards the main character?

View 7 Replies

ActionScript 2.0 :: F8 - Make The Camera Follow A Character?

Feb 16, 2009

im making a platform game at the moment and i need for the screen to follow the character, at the moment i've got the code on the background symbol and all the baddies in that symbol so when you press the arrow key the symbol moves to the side the code i have on this is

onClipEvent (load) {
walkSpeed = 2;
}
onClipEvent (enterFrame) {
if (air == true) {
[Code]....

if anyone knows a way to put this on the camera

View 1 Replies

ActionScript 2.0 :: How To Make Character Attack In Game

Jun 8, 2011

I want to know how to make a character attack in a game. I've made a platformer game in which a character moves and jumps and collects the score balls, but the only thing I can't do is make him hit enemies.

View 1 Replies

Make A Fighting Game With My Own Character Skins?

Feb 12, 2012

I want to make a fighting game with my own character skins and those of my friends as a fun thing.I'd like it to have an intro, menu, character select, level select. I'd like the levels to be able to scroll and for the characters to have health metres. So what I am looking for is either a tutorial to build this up, or be able to look at a completed one and take it apart. I'll be able to handle the art on my own.

View 4 Replies

Professional :: Make Character To Jump When Hit The Space Bar?

Aug 10, 2011

how do i make my animation not fall of the stage when i make it move with they arrow keys?also how do i make my character jump when i hit the space bar using actionscript?

View 1 Replies

Math :: Make Character Escape From Shot?

Mar 25, 2010

I have a 2D game (top down), and I would like to make the character escape from a shot, but not just walk away from the shot (I mean, don't be pushed by the shot), I want it to have a good dodging skills.The variables are:

shotX - shot x position
shotY - shot y position
shotSpeedX - shot x speed[code].....

View 2 Replies

AS3 :: Make 3D Character Customization For Game In Flash?

Nov 17, 2011

Is it possible to make 3D character customization for game in flash? Any ideas, tips about that?. In 2D it's very simple but i don't know where i should begin in 3D. First of all - how character customization works in rpg games? Is character body and all cusomizable parts like hair face, solid model? Or it's just different objects in one container?

View 2 Replies

ActionScript 3.0 :: How To Make Character Disappear(alpha)

Feb 24, 2011

My problem is how do i make the character disappears when move on to certain places(clicked by user). For example i have a Object(house) with x=233 and y= 134, when i click on the object (house), the character will move to that current object(house) and when the character has reach or move in the house, the character disappears(character.alpha = 0).

View 4 Replies

ActionScript 2.0 :: Make A Function That Moves The Character?

Aug 7, 2004

I have a problem with functions.I want to make a function that moves the character and let him do a different thing like kicking or going down and jumping. Here is the code i have:

Code:
function enableKeyMovement(clip) {
clip.onKeyDown = function() {[code]....

i want the up key to be pressed once, the down key to be hold on to and when released it goes back, and the right and left to be hold on to and when released goes back to 1.

View 1 Replies

ActionScript 2.0 :: Make A Customize Character Frame?

Oct 28, 2008

I want a make a game where you get to customize your character and that is the character that you play with the whole game.

View 1 Replies







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