ActionScript 2.0 :: MC Never Stops - Walks In Wrong Direction?

Mar 6, 2007

I have a MC linked with AS called char. And the problem is this, the char is supose to walk towards the mouse when i click the mouse. But now the problem is that the MC never stops. It just walks and often in wrong direction.

var speed = 5;
var aim = "crsSword";
var Move = false;[code].....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Game: Character Walks Around And Stops Walking When Hits A Hole?

Jul 7, 2011

I have a game where the character walks around the screen and stops if she hits a wall or a hole etc... - typical. HOWEVER - I coudn't get her to stop walking. Is there any standard code for this. If you tell to stop walking then she can't walk back out either etc... Also, she walked into the hole a little so being in the hole she definately couldn't walk any more not even back out as she would be walking inside the prohibited zone.

View 3 Replies

Middle And Right Boxes Are Scaling In The Wrong Direction

Jan 16, 2008

I've got 3 horizontal boxes. I've got them scaling to the size I want but the middle and right boxes are scaling in the wrong direction: I need the middle one to scale out from the centre and the right one to scale out towards the left from the top right (ie the reverse of what the left one does). Please see guides in attached file if you need more info.

View 0 Replies

Actionscript 3 :: Character Only Stops At Walls In One Direction?

Oct 20, 2011

I tried almost everything to make my character stop when it detects a wall. It only works for UP and RIGHT or DOWN and LEFT but not all 4 directions, so only one y movement and one x movement. So I decided to make 4 functions, one for each direction. But then it only works when the left key is pressed and hits a wall.

What do I have to do to make the collision detection stop the character from moving in all 4 directions?

var leftArrow:Boolean;
var upArrow:Boolean;
var rightArrow:Boolean;

[Code]....

View 2 Replies

ActionScript 3.0 :: Make A Character Move Its Legs When It Walks?

Mar 18, 2012

I want to make a character move its legs when it walks but I don't know how to do this.

Not necessarily just move this character, but general movement in general.

View 4 Replies

ActionScript 2.0 :: Scrolls Continuously In A Direction Until The Direction Of The Mouse Is Changed?

Feb 24, 2009

i have a scroller developed in as2. it basically scrolls continuously in a direction until the direction of the mouse is changed. the images of course loop in the continuous scroll. now the problem is that for 10-15 photos its ok. but when i feed it with 180 photos, it seems to show only 11. why would this be? any restriction on flash ??

View 1 Replies

Professional :: Put A Black Box Layer Over It That When The User Walks In Front Of The Camera

May 8, 2011

Im currently working on a piece for my final year project that takes a webcam and has an old movie effect over it in as3. I have this all working but what I need to know asap though is, Is there a way that i could put a black box layer over it that when the user walks in front of the camera that the black box would disapear. The code I have in the actions panel for the webcam is:

[Code]...

View 3 Replies

ActionScript 2.0 :: Make A Game - Mc Doesnt Fall Through The Ground When He Jumps Or Walks?

Jun 25, 2005

Well, basically i need to make my game so my mc doesnt fall through the ground when he jumps or walks, coz so far all he does is jump, then fall through the floor.

View 3 Replies

ActionScript 3.0 :: Direction Of The Ball In The Direction Of The Mouse

Mar 17, 2011

have a ball with the name of mc which can be moved using the keyboard .. when you press the left mouse button shoots the ball, this ball and the other flies in the face where the cursor was in the shot .. but if you move the cursor to another location and shoot a second time then the second ball is also flying in the direction of the cursor and the first ball change direction toward a second shot ..

ActionScript Code:
import flash.display.MovieClip;
import flash.display.DisplayObject;
import flash.events.MouseEvent;

[Code]....

how to make that first ball did not change its direction and continued to fly in the direction of the shot?

View 5 Replies

Skipping To Wrong Frames

Aug 3, 2009

I'm making a flash company profile in the style of a website, except it won't be uploaded online.and i made each button skip to a frame that i already named

some of the buttons are skipping to the wrong frames for some reason,the ones that are not working properly have some pretty big picture files on them,could this be the reason or is it just an action script mistake?

View 1 Replies

CS3 :: Playing In Wrong Order

Aug 26, 2010

I did a banner in flash CS3. I did 8 things and you see them one after the other one. The first time that it plays it goes on the right order but after it finished, when it normally has to start playing again, it plays in wrong order (the first then the third, the last, the second again the first, last and so on), it just does what he wants and not what I did.

View 1 Replies

ActionScript 3.0 :: When Typed Many J's.only First Looks Wrong?

Mar 13, 2009

when I type j in the input box (or grid) component it looks like i. is it bug? when typed many j's.only first looks wrong.

View 2 Replies

Professional :: IE Loading Wrong Xml

May 26, 2011

I have built a website that contains two flash galleries on two separate pages.Each .swf galllery is meant to call a separate xml, loading the relevant text and images.The galleries work perfect when using Firefox-windows, Firefox-mac and Safari and on my local machine(macbook)The galleries do not work using IE-windows, the problem being it loads both galleries with the same xml. [URL]

View 3 Replies

Flash :: Particularly Wrong With Function?

Jan 9, 2012

Is there anything wrong with this function?

[Code]...

View 2 Replies

ActionScript 3.0 :: Error And Nothing Is Wrong

Sep 24, 2010

can u re-write the code? im not sure im getting it.

View 9 Replies

ActionScript 2.0 :: My Buttons Gone Wrong

Jun 24, 2005

I am not sure why they are not wroking but I have converted the buttons to th button symbol.

View 11 Replies

ActionScript 2.0 :: GotoAndStop Going To Wrong Frame

Mar 6, 2009

I have an AS2 flash movie that has some labeled frames. On the first frame of a particular scene, I have some code that creates a menu of buttons that I construct from movie clips and vector graphics. The onRelease function of those buttons is assigned deep in some code thusly:

code: buttonMC.onRelease = function() {
trace('release, going to ' + this.sceneName);
gotoAndStop(this.sceneName);
};

When one of these buttons is clicked, the scene name reports correctly, but the movie goes to a frame 3 frames later than the targeted frame. I know this because I put trace actions on the subsequent frames like this: code: trace('2 after');

View 1 Replies

ActionScript 2.0 :: Add Score (if Correct +10), (if Wrong -10)

Dec 14, 2009

I have a game which I want to add score (if correct +10), (if wrong -10)

View 6 Replies

How To Prevent Wrong Event.target

Dec 1, 2010

Now, when I click on the button in the area where the movieclip is it will register this movieclip as event.target. I would like to make the button the event.target regardless where I click and prevent flash from registering the movieclip inside the button as the target.

View 3 Replies

Spinning Motion Preset Looks Wrong?

Jul 5, 2011

What I have done is create a new actionscript 3 document, imported to stage my bitmap then converting it to movie clip, then i just apply the 3d spin motion preset.When i try the movie it spins ok apart from 1 frame where it looks like the bitmap moves to the left slightly.Do I need to delete frame 1 or the last frame perhaps

View 4 Replies

Pre-Loader Skips To Wrong Frame?

May 9, 2009

This is a bit of an odd-ball problem. I've created a website 524 frames long, but am creating the pre-load bar *after* the website is done. I could move all the frames a few over, but this would require remapping all my many, many buttons. What I've done then, is told Frame 1 to go to Frame 525, and put the preloader there. I should note the site works perfectly without the pre-loader, I just want it to be smooth once it makes it online.The following code is being used for the first frame (frame 525) of the pre-loader:

bytes_loaded = Math.round(this.getBytesLoaded());bytes_total = Math.round(this.getBytesTotal());getPercent = bytes_loaded/bytes_total;this.loadBar._width = getPercent*100;this.loadText = Math.round(getPercent*100)+"%";if (bytes_loaded ==

[code].....

View 3 Replies

ActionScript 3.0 :: TextHeight Property Wrong?

Sep 3, 2009

I need to distribute some images vertically parallel to a dynamic text field wich content is loaded from an XML file. The first image top-aligned, the last one bottom-aligned and equal gap between them. Easy, no? That's what i thought but I'm banging my head as I can't get it and my only guess is the textHeight property has a wrong valueI calculate the gap between images with:imgGap = (txtHeight - imgsHeight) / (nImgs - 1);the problem is that the first 8 images reach the textfield bottom:1046 px (the sum of the first 8 images)1281 px (7 gaps x 183)gin = 25;}

View 1 Replies

Link Point To The Wrong Place?

Nov 5, 2009

I have a link in my flash file  - [url].... . Its the please enquire link on the right.My issue is that the link to the mailto: address work fine, but when you hover over it, its displaying " http:[url].....The link on the left with the video icon is pointing to the about page, is this screwing it up?

Attachments:
intro.zip (1.1 MB)

View 6 Replies

ActionScript 3.0 :: GotoAndPlay Going To The Wrong Frame?

Feb 24, 2010

I am trying to create a Play Again button on my game. When the game finishes a menu comes up on the screen with a play again button. The menu is created using a class and the button event is created and handled in the actionscript in the current frame. The button event handler makes a call to gotoAndPlay(currentFrame, "scene").
 
Whenever the button is pressed however it takes me to the next frame, for example if the current frame is 3 it will show frame 4. Usually the button is removed from the stage when the button is clicked but if i disable that and the button remains, you can click on it again and it it will take u to the correct scene, and again will take you to the next scene and back again and so on..

View 5 Replies

ActionScript 1/2 :: Something Wrong With Comparison Result?

Aug 16, 2010

I have a problem that bugging me and hindering me from advancing to next part of the game. I'm very much behind schedule because of these weird behavior. (Well I blame my ignorance for not properly coding them)
 
I'm trying to do a simple click-and-match game where there are 18 items to flip but only 10 items (5 pairs) are the valid answer. The problem lies with this part:

[Code]...

View 3 Replies

ActionScript 1/2 :: Picking Up Wrong Sound?

Sep 27, 2010

with attaching a sound to a movie using AS, in this case, it is a car tire that screeches when rolled over. I added a "tailpipe" idle sound when we roll over the tailpipe of the car. I have attached linking to the sound file named, "idle", and copied the "screech" AS code and edited, but now all the screeching tires have picked up the idle sound. All the movie mechanics work fine. Here's the AS Code:(T1 & T2 are the tires, tailpipe is the idle movie)

T1.stop();
T1.onRollOver = over;
T1.onRollOut = out;

[code]....

View 1 Replies

ActionScript 3.0 :: Wrong Time Zone

Feb 16, 2011

var nextDay:Date = new Date("Mon May 1 2006 15:30:00"); // yields Mon May 1 15:30:00 GMT-0400 2006  (I''m in ET zone, so it should be -0500)

View 5 Replies

Professional :: Embedding F4v In Documentation Is Wrong?

Feb 25, 2011

I am trying to embed an f4v file into Flash CS5, however the program won't accept the file  I've tried renaming the extension and removing the audio stream. The only thing that seems to work is if its a TRUE flv file using VP6 and with a .flv extension.The documentation here regarding embedding flv/f4v mentions the ability to embed either file formats:I have found no positive results on google and there doesn't seem to be a Flash Jira for bug tracking.

View 2 Replies

SWF Intermittently Plays Wrong Audio

May 16, 2011

I created an interactive exercise to teach music. After the correct answer is given, the user has the option to click on a button and hear a specific sound (a chord played on the piano). The sound button appears only after they give the correct answer, and they can click on it as many times as they want. There are a series of these exercises, each one on a different frame and each one with a different sound.The sound files are called in the button code.

Here's the problem. In some of the exercises, if I keep clicking on the sound button, it plays the correct sound about 20 times in a row but then it will suddenly play a different sound (a chord from one of the other exercises). Then it goes back to playing the correct sound.

View 3 Replies

Actionscript 3 :: Flash Gets XML But The Values Are Wrong

Apr 13, 2010

Flash receives the XML, but the values are wrong. How do I fix this? Problem I can see the XML loaded with no errors, but my output is way off. It's as though it's not receiving any values. Numbers in the output window and animation move rapidly. The Flash file runs as if it's variables where set to zero. I changed the order of my code, but that didn't help with this. how I can correct this.

[Code]...

your problem is that you're calling myLoader.load() and adding an event listener to wait for the xml to finish loading, but you're then immediately setting var delay:uint = 0; and var repeat:uint = 0; and starting the timer. you can see this in your results by the 1, XML, 2, 3, 4 output. the load call is asynchronous so it returns immediately. you need to wait until your processXML function is called before proceeding to the next step.

View 1 Replies







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