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




Stop Walking And Face The Same Direction? (RPG)



I'm working on a game with a sort of RPG style view, in which the arrow keys move the character up down left and right on the screen. The character MC has eight frames, four with walking MCs and four with standing still MCs.

Here is my current script:

-----------------------------

onClipEvent (load)
{
this.gotoAndStop("downFace");
}

onClipEvent (enterFrame)
{

if(Key.isDown(Key.SHIFT))
{
movespeed = 3;
}
else if (!Key.isDown(Key.SHIFT))
{
movespeed = 2;
}

if(Key.isDown(Key.UP) && !Key.isDown(Key.DOWN) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT))
{
this.gotoAndStop("upWalk");
this._y-=movespeed;
}

if(Key.isDown(Key.DOWN) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.UP))
{
this.gotoAndStop("downWalk");
this._y+=movespeed;
}

if(Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.UP) && !Key.isDown(Key.DOWN))
{
this.gotoAndStop("leftWalk");
this._x-=movespeed;
}

if(Key.isDown(Key.RIGHT) && !Key.isDown(Key.UP) && !Key.isDown(Key.DOWN) && !Key.isDown(Key.LEFT))
{
this.gotoAndStop("rightWalk");
this._x+=movespeed;
}

if (!Key.isDown(Key.UP) && !Key.isDown(Key.DOWN) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT))
{
this.gotoAndStop("downFace");
}
}

-----------------------------

I REALLY like the way the last part works, detecting any time that none of the four arrow keys are being pressed. At the moment I just have it set for "downFace", so whenever you aren't moving the character defaults to facing down (facing you). But I need it to ALSO detect what the last key pressed was, ie the last direction the character was walking. Is there a way I can add on to that, basically saying "if the up key isn't down, the down key isn't down, the left key isn't down, the right key isn't down, AND the last key down was left, then go to "leftFace" (the frame in the character MC with him standing still and facing the left). And follow that with "else if" statements for the other three directions? If someone could tell me the best way to modify this without completely changing my current script I would really appreciate it.

I'm just very attached to the way it is now because it got rid of any weirdness caused by multiple keys being held down (in the past I would hold three of the arrow keys and the character would glide off the screen).



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-05-2006, 10:17 PM


View Complete Forum Thread with Replies

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

How To Detect Direction Of Movieclip And Rotate To Face Direction
Hi!

I have searched this forum, but Im not really sure what to search for, so I havent found anything similar to this. If anyone know, then please post the link to that thread.

I am trying to do some sort of aquarium with random moving amoebas.

But I want the amoebas (movieclips) to detect in what direction (angle) they are moving and rotate so that they "face" the direction they are going in.

I also post the fla file here so anyone can download it to see what I mean.

Thanks in advance

Detect Direction Of Movieclip And Rotate To Face Direction?
Morning all!

Little thing bugging me here.....

I have a movie clip which moves around the stage randomly, but I want it to face the direction it randomly changes to. Can you help or shed some light for me?

Here is my code:


PHP Code:



onClipEvent (load) {
    width = 600;
    height = 450;
    speed = Math.round(Math.random()*2)+1;
    x = Math.random()*width;
    y = Math.random()*height;
    this._x = x;
    this._y = y;
    x_new = Math.random()*width;
    y_new = Math.random()*height;
}
onClipEvent (enterFrame) {
    if (x_new>this._x) {
        sign_x = 1;
    } else {
        sign_x = -1;
    }
    dx = Math.abs(x_new-this._x);
    if ((dx>speed) || (dx<-speed)) {
        this._x += sign_x*speed;
    } else {
        x_new = Math.random()*width;
    }
    if (y_new>this._y) {
        sign_y = 1;
    } else {
        sign_y = -1;
    }
    dy = Math.abs(y_new-this._y);
    if ((dy>speed) || (dy<-speed)) {
        this._y += sign_y*speed;
    } else {
        y_new = Math.random()*height;
    }
}





I have experimented with:

_rotation = (Math.round(180 / Math.PI * Math.atan2(diffy, diffx)) + 360)
and also this._rotation += 1; but not having much luck. Thanks for looking and helping if you can

[F8] Make Something Face The Direction It's Going
I am making a game with a floating tank that has a gun on it that shoots lasers. I need help making the projectiles face the way the gun was facing when the projectile was shot so that the laser isn't always facing left.

This is the code i think you need to tinker with to make this work:

Code:
tank.onEnterFrame = function() {
mousex = _xmouse-this._x;
mousey = (_ymouse-this._y)*-1;
angle = Math.atan(mousey/mousex)/(Math.PI/180);
if (mousex<0) {
angle += 180;
}
if (mousex>=0 && mousey<0) {
angle += 360;
}
firepower = Math.sqrt(mousex*mousex+mousey*mousey);
if (firepower>200) {
firepower = 200;
}
this.cannon._rotation = angle*-1;
};
function onMouseDown() {
if (fired<max_firepower) {
fired++;
angle = tank.cannon._rotation-1;
start_ball_x = tank._x+40*Math.cos(angle*Math.PI/180);
start_ball_y = tank._y+40*Math.sin(angle*Math.PI/180);
cannonball_fired = attachMovie("cannonball", "cannonball_"+_root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
cannonball_fired.dirx = Math.cos(angle*Math.PI/180)*firepower;
cannonball_fired.diry = Math.sin(angle*Math.PI/180)*firepower;
cannonball_fired.onEnterFrame = function() {
this._x += this.dirx/25;
this._y += this.diry/25;
if ((this._y>350) or (this._y<0) or (this._x<0) or (this._x>550) or (objects.hitTest(this._x, this._y, true))) {
this.removeMovieClip();
fired--;
}
};
}
}
I appreciate your help, just tell me if this isn't what you need to change.

Random Movement + Face That Direction
I've seen plenty of examples of random motion/movement but i'm trying to find example of an object that faces the direction it is heading.
Can anyone help me with a tutorial or an example?

thanx

How To Make A Sprite Face The Direction It's Moving
Enjoy the fish:

http://www.tankbangers.com/LAYOUT1.swf

peruse the FLA:

http://www.tankbangers.com/LAYOUT1.fla

Notice how the fish flee from an advancing cursor (much like real fish). I have tried using atan2 and other tricks to get the fish to face AWAY from the pursuing mouse cursor, but what happens is that when the fish are moving from _Xpositive to _Xnegative (right to left) they appear to be swimming upside down. I have abandoned atan2 for the time being. Is there a way to get a movie clip to reflect along the y axis depending on which side of the mouse cursor it is on? That might be one solution.

Is anyone on the forums up to the challenge of making this work? I would give you co-author credit. (hehe, lame i know)

Here is something else that would earn partial credit:
If you can corner one of the fish you will notice that when you click on it, you can cause it some distress. (meanie!) I would like to get the fish to 'gulp' some bubbles, like in this clip,
http://www.tankbangers.com/LAYOUT1b.swf
http://www.tankbangers.com/LAYOUT1b.fla
but without destroying the random movement and cursor avoidance behaviour of the first clip. Can you figure it out?! cuz I can't

Make Object Move To Point And Face Direction?
Okay; so I'm using rather an odd system to trigger enemy AI in my latest game. If you're wondering why it's odd...don't ask. I'm a 14 year old n00b; whatever works for me . Anywho; here's the triggers I need attached.

onClipEvent (enterFrame) {
if (_root.hdeath1.text>=1) {
//Enemy is alive
if (this.hitTest(_root.meleeai)) {

Here's where I need to make the MC: guy1 move to and face the MC: attack

}
}
}

Thanks
-SaRs

Walking Animation Stop();
Someone has been helping me out, seeing if anyone else can help me out:

I have a walking person that goes to the middle of the stage, stops, and looks down and something in their hand

I have a main timeline that contains a movie clip (I will call it 1) and 3 frames as of right now.

That movie clip is actually the person walking arcoss the screen, so the tweened person.

Nested inside of that, is a mc (called 2) that is the actual steps of the person walking.

Here is my problem that was partially fixed.

I need my mc 1 to run and stop and then go to frame 2, frame 2 will have a mc on it as well, that should run its course, and then go to frame 3 and so on.

This was the code that was put at the LAST frame of the MC 1 (the tweened person walking)
stop();
_root.WalkingMc.motionMc.gotoAndStop(1);

WalkingMc is the instance name on the main timeline
motionMC is the instance name of the actual MC 1...the tweened person (Does that make sense?)

When I had just ONE frame this worked correctly. My person walked, and stopped when I wanted it to. The problem came when i added frames. I changed the frame # (I know I have to change this to actual names fin place of the frame #) and it didn't work.

My file size is too large to add it on here, but I can email it to anyone on a mission to help me out :-)

Thank you so much.

Stop Me Walking Through Walls
Can any one help with a basic problem of getting the boundry of a MC and stopping it from walking through a wall in AS3

I used something like this in AS2 http://www.edmack.com/flash_tutorial...b=art_hit_rpg1

thanks in advance

Mario Will Not STOP Walking
I cannot seem to get Mario to stop walking once the key is up. Can someone look at the file and tell me where my script is wrong?


http://www.yousendit.com/transfer.php?action=check_download&ufid=978EDD6346D10655&key=12c7970d1ec0e8345afc85c7f4afb6f809e23db4


Thanks,
Atomic Nixon

Action Script Problem. Stop Walking
I am working on a videogame/portfolio site that has an alien you control around using arrow keys. I have him set up that when I Key.isDown on say the......"up arrow", the alien moves up. And also the key is used as a button, because I also made an invisible goto button that will make him the face the correct direction when the walking movie clip of that direction is playing. My problem is that he doesen't stop walking when he is in place. How do I stop him walking in place?

I don't have my flash open but off the top of my head I can show you how I have the walking MCs setup.

/////////////////////////////////the invisible goto button)///////////////////////////

on (keyPress "<Right>") {
gotoAndStop(2);
}
on (keyPress "<Left>") {
gotoAndStop(1);
}
on (keyPress "<Up>") {
gotoAndStop(3);
}
on (keyPress "<Down>") {
gotoAndStop(4);
}

/////////////////////////////////(the timeline)///////////////////////////////////////

layer1- invisible button script
layer2- Frame1=walking left MC
Frame2=walking right MC
Frame3=walking upward MC
Frame4=walking downward MC

What should I do to make the alien rest???????

Thanks!!!

Using 'hitTest' To Stop Player From Walking Into Wall - Help
hey its me

i have a simple character who i want to stop when he walks into a wall
i have had a look at some scripts but don't make much sense.

the walk script:

ActionScript Code:
this.onEnterFrame=function(){
    if (Key.isDown(87)) {//key 'W'
        _y-=5;
    }
    if (Key.isDown(65)) {//key 'A'
        _x-=5;
    }
    if (Key.isDown(68)) {//key 'D'
        _x+=5;
    }
    if(Key.isDown(83)){//key 's'
        _y+=5;
    }
}

also the movieclip i want to hitTest on is 'Building_mc',
an idea of what i could do would be really nice!

How To Stop Character Walking From When Road Scrolling Reach The Edge Of Screen?
hi
here i have a zipped fla file where i have problem with the character still wallking when road scrolling reach the end of the screen.
how would i stop that?


Code:
//road scrolling
road.onEnterFrame = function() {
if (_xmouse>600 || _xmouse<200) {
midpoint = 400;
right = this._x+this._width;
if (_root._xmouse<midpoint) {
if (this._x<0) {
this._x = this._x+((midpoint-_root._xmouse)/50);
}
} else {
if (this._x+this._width>800) {
this._x = this._x-((_root._xmouse-midpoint)/50);
}
}
}
};
//4 different mascot movieclips and all invisible to begin with except one
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 1;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 0;
//mascot movieclips in/visible depending on _xmouse
mascot.onEnterFrame = function() {
if ((_xmouse<400) && (_xmouse>200)) {
mascot.mascotfl._visible = 1;
mascot.mascotfr._visible = 0;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 0;
}
if (_xmouse<200) {
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 0;
mascot.mascotwl._visible = 1;
mascot.mascotwr._visible = 0;
}
if ((_xmouse>400) && (_xmouse<600)) {
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 1;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 0;
}
if (_xmouse>600) {
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 0;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 1;
}
};
thanks

How To Stop Character Walking From When Road Scrolling Reach The Edge Of Screen?
hi
here i have a zipped fla file where i have problem with the character still wallking when road scrolling reach the end of the screen.
how would i stop that?

heres script:

Code:
//road scrolling
road.onEnterFrame = function() {
if (_xmouse>600 || _xmouse<200) {
midpoint = 400;
right = this._x+this._width;
if (_root._xmouse<midpoint) {
if (this._x<0) {
this._x = this._x+((midpoint-_root._xmouse)/50);
}
} else {
if (this._x+this._width>800) {
this._x = this._x-((_root._xmouse-midpoint)/50);
}
}
}
};
//4 different mascot movieclips and all invisible to begin with except one
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 1;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 0;
//mascot movieclips in/visible depending on _xmouse
mascot.onEnterFrame = function() {
if ((_xmouse<400) && (_xmouse>200)) {
mascot.mascotfl._visible = 1;
mascot.mascotfr._visible = 0;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 0;
}
if (_xmouse<200) {
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 0;
mascot.mascotwl._visible = 1;
mascot.mascotwr._visible = 0;
}
if ((_xmouse>400) && (_xmouse<600)) {
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 1;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 0;
}
if (_xmouse>600) {
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 0;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 1;
}
};
thanks

Image Scroller With Stop/change Direction?
Hey everyone.

I am a flash newbie so please bear with me! I did try to search on here for how to do this but I couldn't find anything that fitted really with what I am looking for.

I want to create a scrolling image marquee in Flash; when you mouseover the middle, the scrolling stops, when you mouseover to the left side, the images scroll to the left, when you mouseover to the right, the images scroll to the right. I have no idea how to do this!

I have seen a few tutorials where you can create something similar like with thumbnails or where it's continuous but I don't want thumbnails and although continuous would be fine if I can't achieve this, I would prefer to be able to have something a bit more fun!

If anyone knows of any good tutorials (newbie friendly!) or if anyone wants to tell me how to do it (for free, I can't pay you I'm afraid!), I would be VERY grateful!

Many thanks!

Annie

The Walking, Fast Walking, Running Man On Preloader.
Hi, you guys have probably seen the running man tutorial by Lee? It's the one where you do it in poser and export it as swf.

Well, this is what I wanted to do and I am having trouble on how to begin with it.

I am making a preloader which at the very begining there will be a walking man(made from poser) on top of the bar just like below...



Then, I wanted it to change from walking to fast walking (Can be done with seperate poser swf files) when the preloader bar reaches 1/3.

Then at 2/3 I want it to change from fast walking to running (Another different swf file).

I know this is possible, it's just the matter of being able to code it.. I am still very new at action scripting so if any of you can help me, I will be very greatful

Thanks!

Image That Follows And Moves Into The Direction To The Direction The Mouse Is Moved.
Hello

I'm having problems trying to figure out how to come up with a solution to this dilemma so any help would be more than greatful!

IN A NUT SHELL

I want to make an image (one that is larger than the actual stage itself) to follow and move into the direction to the direction that the mouse is moved to. So when the mouse is moved 65 degrees, the image should move 65 degrees etc etc.


PLEASE HELP! PRETTY PLEASE!

Thanking you in advance, cheers, lovely thanks!

Movie Direction Based On Mouse Direction
I have a MC with two movies init one going left one going right.

I want to have the clip direction change based on the direction the mouse is going.

One:
I need to know how to tell wich direction the mouse in going

Two: I need to know how to switch the clips inthemovie based on the direction.

I'm fairly new the indepth scripting.

Thanks for any help.

Roger

Walking A Character.. Detailed Walking.. Very Detailed.. Lol.. Help?
ok, a great question.. i can get a character to move.. i.e. onKeyDown Left move Moviename _x-5 or whatevar aite.. ok, now how can i make that to where it changes the movie too?
Say on keypress right the character turns right, and then walks.. but if the person releases the key then the character stops walking but stays facing right? or up, and down, ect.. Thanxz for any help guys!

P.S. Just like on http://www.goldyard.net
Those exact commands.. Thanxz again guy's!!!!!

-c.k.

I-face Help
I downloaded this i-face that i want to use for a web site that i am building and cant seem to get it to work....I want to be able to use my own text and links....Could some one please look at this thing and see if you can tell me how to do it?
www.homepage-grafiken.de/english/alienmachine_eng.html

Rotate Two MC To Face Each Other
Hi there,
I have movie clips wondering the screen and when they come across each other they stop.

But I would love them to rotate and face each other.

any ideas anyone or examples
cheers, stu

MC To Face Mouse
hey can sum1 plz show me the code to make an MC face the mouse. I don't want it to move towards the mouse, just rotate to face it. Thankyou for your time & help!

Winking Face?
how do you make a character wink?!? I'm trying to get a smiling face to wink... but when the tween happenes it gets all retarted...

any ideas would be greatly apreciated


thanks

Erica

Getting A MC To Face Forward
I have this cute little tank that you can drive around.
however the tank faces sideways initially so when you move it forward or back its going sideways.
ps. The tank can only go forward and backward and spin in each direction. (J+F=Fwd, U+R-Rev Turret = I or E)

I think its because the Tank MC is comprised or 2 instances of the tread MC and thats messing it up somehow...

I am using Flash 5

My Face Is Melting Off...
I have a question...and here it is--> Is it possible to stream a .WMV file from a url in flash mx?
I have googled for hours, and my face is melting off.<br> While searching through previous post pretaining to my problem I found this one from last year... un-answered... <br>so any help you could offer would be very...helpful.<br>


I tried embedding the 3mb .WMV into my 400kb .SWF file and it bumped the .SWF file up 40mb... <br>shortly there after I realized that embedding was no longer an option, <br>and thats when my face began to melt off.

Rotate To Face.
I'm trying to make an ai. This is what I've got. What it does is it makes the ai face the player and moves it in the direction of the player. I want to make it just face the player. any ideas?
z = _root.man._x-this._x;
r = _root.man._y-this._y;
_root.a = z;
_root.b = r;
e = z/r;
k = Math.atan(e);
g = k*180/Math.PI;
_rotation = g;
if (_root.man._y>this._y) {
this._rotation = 90-_rotation;
} else if (_root.man._y<this._y) {
this._rotation = 180-(_rotation-90);
}
g = _rotation*0.01745;
z = Math.cos(g);
n = Math.sin(g);

Face Rotation
I created a full face for a character. Is there any tool that could help me rotate it the left and right to give me a profile?

Thanks.

Need Face Pictures, Please
I am starting a movie and I need about 6-11 people for face models. I'm looking for good quality pictures from five angles of your head. All I need are male characters and pictures of the neck up and good enough quality to trace the head. The flash is a comedy/action where a brother battles another brother over the fathers company. I have an example of the angles that I'm looking for in the pictures (the size is small compared to what I want). Please send anything to aggressiveinline00@comcast.net. Help is greatly, greatly appreciated! Thank you.

[IMG]http://i39.photobucket.com/albums/e182/Darkspike000/NerfFaceTemplate.jpg[/IMG]

The example is not to size, but it gives u a good idea of what I'm looking for.

Rotating To Face Something
is it possible to rotate an object so that it always faces another object that is able to move around the screen? as in track it on the y and x axis?

any help much apreciated.

Render Face
hi all,

got a quandry, wondered if anyone had explored this idea.

i want to distort a movieclip so that i can perform perspective type distortions. ok that sound wierd so a practical example:

i have a square mc inside which are two images or something. now let's say i want to flip the square by using perspective and scale. i want the stuff inside the mc to move accordingly 'basically rendering on the face of the square'.

the only good example i have to show (which is really advanced) is www.mailorderchickens.org Click the more info on a postcard as see what happens.

no i reckon this sort of thing might possible if i can use the draw api to create the 4 points of the square and then animate each point. Has anyone tried this sort of method with an image inside the mc?

anyway this thread is mainly to scope ideas and see if we as a community might find ways of exploring this idea.

all help is appreciated, thanks!

Jib Jab Face Morphing
Hello people, I am new to this forum. I was just looking at the Jib Jab website and I'm very curious as to how they managed to do this sort of thing (mapping faces from photos and putting them within an animation with actors etc)

Here is the link to their site: http://www.jibjab.com/

I would be ever so grateful if someone on here could tell me how I might go about achieving this sort of morphing within flash for my own projects.

Well that's pretty much it, thought I'd keep it short and sweet
Thank you for any help in advance. I wish you all a very merry christmas and a very successfull new year!

All the best

Ash

Rotating To Face Something
is it possible to rotate an object so that it always faces another object that is able to move around the screen? as in track it on the y and x axis?

any help much apreciated.

Face Center
Hi

I want to get a movie to rotate around an other. This I have done ok.
But what I now want to get is the rotating movie to always face towards the central movie. I think it will involve the _rotation oproperty but can not work it out.

Please help

Thanx

<font Face> Or What?
Hi there!
I have a problem with russian font apearance!
visit this link and you'll see:
http://y-makca.pisem.net
on my side it's looking correct, because i'm in Russia! But i'm not sure it will be correct on yours! All the text info is taken from a txt file. And the font set as <font face="Arial CYR">bla bla bla</font>. What should i do to solve this problem? And i publish the movie as flash 5, using of higher versions is permitted! Embed fonts are not allowed too, because of their Antialiasing! And text should be taken from an external resource!
Help me please!

Face Center
Hi

I want to get a movie to rotate around an other. This I have done ok.
But what I now want to get is the rotating movie to always face towards the central movie. I think it will involve the _rotation oproperty but can not work it out.

Please help

Thanx

Animated Face?
Hi,
I have a Mc with 30 frames, where a human head is turning from left to right. At frame 15 the human head is in the middle position.
Now i try to move the play head of that Mc forward or backward depending on the _xmouse position. It should look like the head is smothly "following" the mouse cursor. If the mousecursor did not move the play head should move slidly back to the middle position at frame 15.

Can somebody please give me a hint how to do that with actionscript?

Thank you very much for any ideas!

greets, ohara.

How Do I Make My Face Into Vector?
I want to put my face into a vector format! How do I do that? I know of people who have. I just want it to be a simple looking one to were I can maybe morph my mouth around and stuff. I just want to know how to change it from a bitmap to a vector?

Thanks,
Bluerain

The True Face Of ASCII
I am a little bit confused with what ASCII really does and is. Is ASCII a system that maps the keys on a keyboard? Or is it a system that maps the characters (a-z, A-Z, and symbols) only?

I ran into this question while testing two functions with Flash ActionScript. The SWF can be tracked from http://www.geocities.com/evresihopes/Test_KeyObject.swf

To use this SWF, just make sure your browser is active, and press any key on the keyboard.

The two functions that I was testing are getAscii(); and getCode();. getAscii(); returns its value, which is the ASCII representation of the particular key pressed, to the upper field (labelled ASCII >), and getCode(); returns its value, which is a virtual code that is
associated with each key on the keyboard, to the lower field (labelled Virtual Code >).

So, when we press the "Shift" key on our keyboard, the "ASCII >" field returns 0, but the "Virtual Code >" field returns 16, and pressing the "Caps Lock" on our keyboard, the "ASCII >" field returns 0, too... Umm, it's really confusing as it's not returning something I
really expect.

Could someone please help?

Follow And Face Mouse
does anyone know an actionscript that makes several movie clips (same character but facing different directions) follow and face the mouse???
cheers.

Face Mouse And Move Towards It
can anyone help me?
i want, no, would like to do something in flash mx 2004, you know, that program.
aaaaaaaanywaaaaaaay, this is knid of what i want,
if the mouse is on left character = characterleft
if the mouse is on right character = characterright

and so on with up, down, upleft etc. (characterleft being a graphic or motionclip of a character facing left etc)

also i would like it to follow the mouse as well!

cheers.

Dynamic Clock Face
I want to indicate the passage of time by having the second hand or sweep arm of the clock highlight a section of the clock face. For example, as the sweep arm rotates through a 360 degree circle, I want to have 90 degrees highlighted in red to show the passage of 15 minutes. it would look like a quarter slice of pie in red the three quarters of the pie in white. here's how I'd like it to work, the arm begins it sweep at 12:00 and as the sweep arm rotates pass the 3, the background will change from white to red, and after the arm rotates through the 6, the clock face returns to white. When the sweep gets to the 12 and stops, the clock face will show, a quarter slice of pie in white, between 12 and 3, a quarter slice of pie in red, between 3 and 6, and a half of the pie in white.

I get the idea it's not too complicated a setup and I'm just missing something obivous. thanks in advance, any help would be appreciated.

Dynamic Clock Face
I want to indicate the passage of time by having the second hand or sweep arm of the clock highlight a section of the clock face. For example, as the sweep arm rotates through a 360 degree circle, I want to have 90 degrees highlighted in red to show the passage of 15 minutes. it would look like a quarter slice of pie in red the three quarters of the pie in white. here's how I'd like it to work, the arm begins it sweep at 12:00 and as the sweep arm rotates pass the 3, the background will change from white to red, and after the arm rotates through the 6, the clock face returns to white. When the sweep gets to the 12 and stops, the clock face will show, a quarter slice of pie in white, between 12 and 3, a quarter slice of pie in red, between 3 and 6, and a half of the pie in white.

I get the idea it's not too complicated a setup and I'm just missing something obivous. thanks in advance, any help would be appreciated.

Dynamic Clock Face
I want to indicate the passage of time by having the second hand or sweep arm of the clock highlight a section of the clock face. For example, as the sweep arm rotates through a 360 degree circle, I want to have 90 degrees highlighted in red to show the passage of 15 minutes. it would look like a quarter slice of pie in red the three quarters of the pie in white. here's how I'd like it to work, the arm begins it sweep at 12:00 and as the sweep arm rotates pass the 3, the background will change from white to red, and after the arm rotates through the 6, the clock face returns to white. When the sweep gets to the 12 and stops, the clock face will show, a quarter slice of pie in white, between 12 and 3, a quarter slice of pie in red, between 3 and 6, and a half of the pie in white.

I get the idea it's not too complicated a setup and I'm just missing something obivous. thanks in advance, any help would be appreciated.

A Face Appear If It Is Being Hand Drawn.....
I want to have a face appear as if it is being hand drawn. Does this require script or could it be done with a mask and motion path. Can a graphic of a pencil be used to give the illusion that it is drawing the lines. Any help would be greatly appreciated.

TextField Font Face ?
code: this.createTextField(“tButtonText”, this.getNextHighestDepth(), 0, 0, 150, 20);

Is it possible to select the Font Face for dynamically created TextField Object?

How Do I Get My Spactula To Face My Plate :)
indeed... ha

Basically if you looky here you can pick the spactula up by click and hold.
http://www.aidanmack.co.uk/dev/breakfast.html

But i would like the spactular to rotate so it faces inwards towards the centre of the plate at all times. And im not sure what maths/code i need to do that.
this crude diagram kind of explains what im on about.
Could anyone point me in the right direction at all?



Thanks
Aidan

How To Fade In And Face Out An External Swf?
how to fade in and fade out an external .swf
when you press button 1... external movie clip 1 enters....
when you press button 2... external movieclip 1 fades out... external movieclip 2 enters... thanks dudes...

MX ScrollBar Face Problems
Hello,
i just got the old scollbar component from Flash MX intro MX 2004 Pro, since i dont know how to do it otherwise (hey i just started using flash

Any way, to the problem,

When i change the component skins "ofcourse" the fsb_thumb_middle resizes depending on how much content i have in the area im scrolling. (The main scroll "button")

So my question:
In the ScrollBar component (from Flash MX now imported into MX2004)

How do i prevent the fsb_thumb_middle to resize?

Or any other suggestions on any other scrolling solution where i can use a static image as scoller "bar image" in this case to scroll a dynamic text field.

Thanx 4 any replies!

Nearest Face Of A Square.
Heyas

I've got a problem and I'm in like my 10th revision of code so maybe you all could help.

I am building a cut-down version of Visio so to speak, where you have shapes on the stage that allow you to connect between the two. So if you wanted to connect ShapeA(x:0,y:0) to Shape B (x:100, y:100) it is regarded as being in the TL corner. Thereby ShapeB's faces available are North and West which can be connected - resulting in no lines crossing over into a shapes inner region.

The concept i want to implement is that when you drag your line connector over your intended drop shape, it snaps to the nearest face (North,East,South,West) aswell as the nearest position you were draging over... ie if the end Line connector node is in the bottom left corner of your drop shape and the nearest face is West, it would then maintain the Nodes.y position but snap the Nodes.x position to the intended shapes x.postion - resulting in a snapping concept being in play.

I can get this happening on two variations. First being line Interesects, where i could determine which face has actual line intersection, based on that it determines the face.

I have also tried measuring the distance between two points, finding the shortest one and snapping to the appropriate face.

The problem with these two basically are this. If you drag your line in a 45 degree angle, so that its basically in the dead center of North/West it can't seem to determine the nearest face as its now either North/West?

I had implemented a Random Choice in the event this occures (ie randomly chooses between North or West).

Has anyone else done something of this nature? something along the lines of Line of Site mayabe?

Can You Put A Picture On A Face Of The 3D Cube?
Since each face of the Script 3D rotating cube is a movieclip, I thought you could load an image on it. I couldn't get that to work.

Mark

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