ActionScript 2.0 :: HitTest Glitch With Ball And Wall

Feb 8, 2009

I'm making a game where the ball bounces off several walls to get to its destination: the portal. When the ball reaches a high speed it glitches through most of the walls.Here is my scene for the 3rd level of my game where the most glitches occur (attached file)In the picture there lists all the variables i put in the objects. You will also notice that I put a "Stuck" button since there were many glitches.[code]

View 2 Replies


Similar Posts:


ActionScript 2.0 :: CS3 To Redirect A Ball Off A Wall?

Nov 20, 2011

I'm trying to make it so that when the ball hits the wall, it bounces off of it.. this is my code

Actionscript Code:
var elastic:MovieClip = _root.createEmptyMovieClip("elastic", 1);var point1:MovieClip = _root.attachMovie("sling", "point1", 3, {_x:50, _y:200});var point2:MovieClip =

[code].....

View 3 Replies

IDE :: Bouncing A Ball Off A Wall Object

Apr 26, 2010

I have created a flash AS3 file with two movieclips. One is a ball (ball_mc) and a wall (wall_mc). The ball bounces around off the outer walls of the stage, in horizontal lines.

The ball also changes direction if it bounces off the wall. However its not bouncing off the wall in the right direction?

Code:

var dx:Number=3; //the amount the ball will move horizontally each frame
var dy:Number=5; //the amount the ball will move vertically each frame
this.addEventListener(Event.ENTER_FRAME,moveBall); // call the function moveBall every frame

[Code].....

View 6 Replies

ActionScript 2.0 :: Ball Is Not Bouncing Off The Wall?

Apr 12, 2005

below is the code I am useing I have created a simple frame with 2 layers one named body and one named Code in the code frame I have

[Code]...

In the body I have 4 walls all named top bottom right and left they are movies and they are named in there instance the same I have a circle I named ball and made it into a movie and named it ball yet when I run the flash file the ball flys off the page and doesnt bounce inside the boxes?

View 7 Replies

ActionScript 2.0 :: Make A Ball Bounce Off A Wall With The Same Angle?

Mar 17, 2002

I am familiar with hit test, but how do you make a ball bounce off a wall with the same angle that it bounced on it with?ex. it hits the wall at 45 degrees, and it bounces off the wall at 45 degrees

View 6 Replies

Boundaries - Ball Will Get Stuck In The Wall And Slowly Travel Upwards

Feb 8, 2009

I am making a pong game and am having some problems with the boundaries. The ball bounces off just fine but if i hit it to close to the boundary, the ball will get stuck in the wall and slowly travel upwards. Bouncing back and forth. It happens on both sides. Also How do you set a key press movement to stop. I want to be able to stop at the boundary if i hold the left key down but it would stop the game entirely. I have it set now so that the controls reverse every time a boundary is hit. My big problem is the boundary though. I will eventually figure out the paddle movement on my own. Another problem I am having is getting my score value to increment correctly. It always reads as a NaN until I score. When I do it goes 1, 11, 111, and so forth. I have the variable set as number values but the dynamic box, I think, is still reading them as strings

View 1 Replies

Full Screen Bouncing Ball Will Not Reflect Off Stage Wall?

Nov 5, 2009

I have added full screen code on my movie so that the user can extend the size of the movie. eg If the user expands the browser window to 1200 X 900, then my movie will become 1200 X 900 without the movie deforming.

Code:
Stage.scaleMode = "noScale";
Stage.align = "TL";

[code]....

View 3 Replies

ActionScript 2.0 :: Make A Ball Bounce Of A Wall And Stll Carry On?

Apr 26, 2011

i want to make a ball move at a constant speed into a wall and bounce of, initially it should move back but then It should carry on moving towards the wall.

I managed to make it bounce but once it hits the wall it carries on in the opposite direction!

View 4 Replies

ActionScript 1/2 :: Restart Ball MovieClip After HitTest

Feb 13, 2011

I have recently started to learn about flash and as2 and I am working on a small shooting style game. I have managed to create a hero that moves around the screen and enemies which I shoot at. The issue I am currently having is that on my ball movieclip (bullett) the first frame holds a ball and the 2nd frame is a small animation of the ball breaking apart. So basically when the ball is thrown and the hittest comes back true the 2nd frame plays showing ball breaking apart. Now when I fire a 2nd time it constantly plays the 2nd frame of the broken ball. How can I restart the ball movieclip in its 1st frame to carry on shooting normally.

Below is the as2 I have on my ball movie clip.
onClipEvent (load) {
var statee;
statee = "ready";
maxJump = -30;
grav = 0;
gravity = 1.5;
[Code] .....

View 4 Replies

IDE :: Using The HitTest To Make Ball Bounce Off Of The Players

May 5, 2010

I'm having problems with my flash game, i am making slimeball and im using the hitTest to make my ball bounce off of the players, but because my players are semi circular when it hits off the back of my player the ball still goes forward when it should bounce off the player in the direction that it came from, if that makes sense

[Code]....

View 1 Replies

ActionScript 2.0 :: Make A Ball Bounce Off Something Like A Ball Bouncing Off A Bumper In A Pinball Game?

Jun 20, 2006

i wanna ask how do i make a ball bounce off something like a ball bouncing off a bumper in a pinball game? i've tried a lot of times but everytime the ball get stucked to the box and it doesn't move anymore...will be grateful if anyone noes the actionscript of it..

View 3 Replies

ActionScript 3.0 :: Ball Collision Inside Another Ball Using Gravity?

Jun 5, 2009

ball collision inside another ball using gravity.I have one large circle in the middle of the stage (its radius is 150 pixels). I have another circle inside of that one (20 pixels radius), this is the smaller ball that I would like to have bounce around inside of the larger one with gravity. When the small ball hits the edge of the larger circle, I would like it bounce inwards to the center of the larger circle. It keeps doing this until it eventually stops in the center of the larger circle at the bottom.

View 1 Replies

Scrolling The Timeline Glitch?

Jul 8, 2009

I'm trying to create a scrolling timeline using a very (horizontally) long image and a scroll thumb that can be dragged right and left. When I first open the .swf file, the position of the image is correct (the far left side is on the stage). But once I click on the thumb and release it, even if I don't drag it, the image jumps as if it was dragged and suddenly I'm looking at another part of the timeline. When I drag the thumb all the way to the left, it can't go any farther left to the beginning and it's just stuck at where it jumped, but I can drag the thumb more to the right and see more of the timeline perfectly fine. Also, when I scroll all the way to the right, the timeline goes past its end and then there's blank white space. There's obviously some space missing at the beginning that should make up for that blank space at the end.

why it jumps like that and why I can't drag it back to the beginning of the timeline. In fact, I used this exact same code for another project and the timeline worked perfectly fine. All I did was use a different image for this one. I'm completely stumped on this.

Here's the actionscript I'm using:

Quote:

stop();
var thumbLeft = thumb._x;
var thumbRight = Stage.width - thumb._width;
var thumbDistance = thumbRight - thumbLeft;

[code]...

View 2 Replies

Graphic Symbol Glitch?

Jun 6, 2009

I've created a small animation containing a few images which i have converted to graphic symbols so I can alpha-tween them. I tweened the first image then copy/pasted the frames to do the next using the swap symbol function. When swapping the symbol I selected the desired symbol and pressed okay but nothing happened - I then dragged the desired symbol out of the library and onto the stage then deleted the previous symbol. As soon as I did that the new symbol I had just dragged out switched back to the previous symbol.

View 1 Replies

ActionScript 3.0 :: Can't Fix Glitch In Game

Sep 6, 2011

I gave this game, kinda like doodle jump on the iphone if you know it. The objective is to jump on platforms as high as you can, you are scored on this. But I have this glitch in my game that i am currently unable to fix, as i do not know why it is happening. The glitch is, if you are like a certain distance off the ground and then you fail to hit a target to proceed then the game over screen does not appear, But it does if yu fail at a low height, well literally about 1 platforms above the start.

[Code]...

View 1 Replies

ActionScript 2.0 :: Create An "hitTest" Script Inside A Movieclip That Is Actually Part Of That HitTest Code?

Jan 15, 2009

i just would like to know how to create an "hitTest" script inside a movieclip that is actually part of that hitTest code?I mean... I have mc A, and mc B. and the current hitTest code im using (that is on the timeline) makes mc A, destroy mc B when collide with it... but there are many mc B on the stage (with the same instance name) so, when mc A collide with one mc B, it destroys ALL mc's B... but i want it to destroy only the mc B that he collides, not all the others... maybe an hitTest script inside a movieclip B would work (somethig like "if MC A hitTest ME = i die" (not all the others)).

View 1 Replies

Professional :: Loading Images Glitch?

Oct 25, 2010

There's a lot more going on in this script than simply loading images.  First I am dynamically creating the movieclips into which the images are being loaded.  I am also dynamically creating masks which are used to make a refelction movie clip (basically an identicle clip that is inverted and place below the clip that is right-side up), and all the clips and masks are added to and positioned within a movie clip on the starge.  The problem is that even when verifying that each mask is in the right place and that the inverted clip has the mask as its mask (which are the last operations carried out by the script called by the image loader's Event.COMPLETE handler)  I still have missing reflections.  Usually the missing reflctions are the first reflections e.g. 1 and 2.

View 1 Replies

Css :: Flash - Glitch With Uploadify's HideButton?

Mar 27, 2012

I'm trying to change the way an Uploadify button looks using the solutions posted here. Instead of changing the Flash file, I want to do it with CSS.

What this involves is wrapping the file input and flash object in a div:

[Code]...

It shows a bizarre blue rectangle over the top of my background-image. Does anyone know why this is appearing? I've tried fiddling with the CSS properties of the object (visibility and hidden) - both hide the entire swf object (and so the blue rectangle), which is useless since it needs to be visible for users to click on.

View 1 Replies

ActionScript 3.0 :: Glitch Of Images Scrolling

Feb 14, 2011

I'm trying to perform smooth scrolling of bg with objects, and as a result got glitches. FPS doesn't fall. how to make it smooth?

View 0 Replies

ActionScript 3.0 :: Slight Scrolling Glitch?

Jun 6, 2011

I've nearly finished a core part of a project but I'm having one very annoying glitch when it comes to a scroll bar. This is my code:

(Thumb = Scroll Button
Track = Scroll Bar
Content = the Movie Clip containing scrollable content

[code].....

View 0 Replies

ActionScript 3.0 :: Glitch When Returning To Frame

Feb 11, 2012

I'm having an issue with a button that exists on a frame in the timeline. I have 5 instances of the same button on this frame. When I first go to this frame, everything is fine. I then go to a different frame. When I give a gotoAndStop() command and return to the original frame with the 5 button instances, 1 of my five buttons is missing. I have no removeChild() commands or anything that would make this button dissappear. why this one button (out of 5 identical instances) would be gone upon returning to this frame?

View 2 Replies

ActionScript 2.0 :: Glitch When Using External Movieclips?

Jun 10, 2006

I've made this site [URL] for my music, and I've got one contentHolder which I load the different sections in to (they are all external swf's). Now, if you manage to press on a different button before the external movie clip belonging to each button has been loaded, the clip goes in to a wierd constant reload state, and it's impossible to reset unless you reload the page.

View 5 Replies

IDE :: Basic Tween Is Jumpy / Glitch?

Mar 14, 2010

I have a simple movieclip on stage which has a circle drawn in it. Just tweening it from one side of the stage to the other causes a jumpy/glitch effect. I'm not using any easing- if I do use it, the glitch is still there. But if I do this: myMc.x-=1 on Event.ENTER_FRAME, the movement is perfectly smooth (but far too slow for what I need, even on 40fps, 60fps upwards). I used to use Flash 8 and have no problems at all (from what I remember).

View 10 Replies

Flash8 :: Dynamic Text Box With Scroller - Glitch?

May 7, 2009

this post references the files listed at:i've implemented a dynamic text box that calls a txt file into it. it uses a scroller that i found a tutorial on:i've got everything working splendidly - everything EXCEPT the scrolling bar... as you can see, it scrolls up and down just fine, but doesn't control the text.i've pretty much exhausted my search through the actionscript to locate the problem and i can't find it.

View 1 Replies

ActionScript 3.0 :: Weird Masking Graphic Glitch?

Jul 31, 2010

Anyone has had white vertical lines along one or both sides of their masks?Looking for the lines and can't find them (Mask are made in the visual interface).The mask is a black rectangle, it moves over a 2 black rectangles, one 100% alpha, the other one 35% alpha. White lines only show on 35% alpha part.

View 1 Replies

ActionScript 3.0 :: Glitch In Pause Button Code?

Jun 21, 2011

designer by trade & having difficulty getting my head around scripting. For most of what I'm doing, I'm managing to get by modifying snippetts that I've found online. However, one spot where I'm now stuck is making a pause button work for streaming mp3 files. I should qualify that adding the pause button was an after thought that I now realise is essential to the project working properly. The mp3 needs to start playing as soon as it starts downloading which is working fine. The mp3 needs to stop when the user goes to the next or the previous page, which is also working fine. But when the pause button is clicked first time, nothing happens. When it's clicked a second time, another instance of the mp3 starts playing. The pause and stop buttons work on this second instance, but not the first. I'm sure there's something really straight forward that I'm missing here, but I need a hand to find it. Following is the script as it now stands.

[Code]...

View 1 Replies

Actionscript 3 :: H.264 .f4v Video 'glitch' On First Playback In Flash

Jun 22, 2011

Can anyone familiar with H.264 video recommend the 'best' compression settings to avoid the occasional visual 'glitch' one gets on playback using the flash video player?

View 1 Replies

Actionscript 3.0 :: Drag Glitch When Mouse Goes Out Of Bounds?

Feb 6, 2009

It happens when you drag the scroll slider out of bounds and you release - even when mouse is up the slider still moves. I consider it a glitch. What does somebody has to do to fix it?the code I use for the slider:

Code: Select allscroll_btn.buttonMode = true;
var dragging:Boolean = false;
var bounds:Rectangle = new Rectangle(-10,-13,0,138);

[code].....

View 4 Replies

ActionScript 2.0 :: Flv Cue Points Targeting Multiple Mc's Glitch

Jan 16, 2007

Trying to target a series of mc's on my timeline using video cue points but can only get the first one to work.[code]

View 3 Replies

ActionScript 2.0 :: Flash8 Button Animation Glitch Involving AS

Apr 22, 2009

Edit: I'm Using CS4. I'm new to AS, but do have background in programming language. I can read and understand. So here is my problem. I'm working on TemplateMonster #16330. So I just want to add another page to the gallery section, and 3 is the default. Basically, button "3" has two version with slightly different code.

[Code]..

View 2 Replies







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