ActionScript 2.0 :: Moveable Circle Around Another Circle - No Overlap
Apr 5, 2007
I have two MC's, circular in shape. One of the circles is stationary and you can drag the other. I'm trying to get the moveable circle to be able to move around the circumference of the stationary circle, but not overlap. I'm able to detect when they overlap, not using hittest. I just can't figure out how to code it so that the draggable circle can't be moved over the stationary circle.
View 4 Replies
Similar Posts:
Mar 8, 2005
I'm developing a game atm, and I need some help on the mathematics/coding of colliding circles (and their change in x/y speed). What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I'm not sure about the maths I need to give the circle the right speed and direction after the collision
If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat "wall" (as it only hits one point), and then calculate the new speed/direction. My only problem is that I'm not sure how to decide the angle of this flat "wall" and how x and y speeds should change when colliding with a wall that is angled. Does anyone here have any insight, links or tips on how I can du this?
View 6 Replies
Sep 30, 2005
i want to make one circle follow the mouse cursor, inside another circle. Similar to an eye looking at the cursor. Ive attached an example.
View 4 Replies
Nov 5, 2008
I have text in a dynamic field showing up as circle. I want to say if circle shows up change it to cercle (french).
[Code]...
View 1 Replies
Mar 8, 2005
What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I'm not sure about the maths I need to give the circle the right speed and direction after the collision.If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat "wall" (as it only hits one point), and then calculate the new speed/direction. My only problem is that I'm not sure how to decide the angle of this flat "wall" and how x and y speeds should change when colliding with a wall that is angled.
View 6 Replies
Aug 24, 2009
I`m working on a app that you can draw lines.....like circles, rectangles... my problem is when a user draw a circle for example....i wanna be able to paint (change color) inside of this circle. I`ve tried working on Shapes with cacheAsBitmap = true and Bitmaps with BitmapData but it doesn`t seens to work.
View 4 Replies
Mar 16, 2012
I want to create circle, and put 8 points on it. So, user can drag each point in order to change it's shape.
Is there any way to do this in flash?
I have some following code:
Ref. - How to draw a continuous curved line from 3 given points at a time
package{import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Point;
[Code].....
So, can anyone convert these three point curve line to 8 points circle?
View 1 Replies
Oct 6, 2009
I have to draw a circle using action script. The Circle Diameter has to be controlled by a button.
View 0 Replies
Apr 10, 2010
Trying to do circle circle collisions via math which I'm really having trouble with. One circle (player) just moves from keyboard. The ball reacts to the player. All the code shown is in my players class and I passed in a reference to the ball.
On my enterframe I have:
Code:
var xmov1 = xSpeed;
var ymov1 = ySpeed;
var xmov2 = ballRef.xSpeed;
var ymov2 = ballRef.ySpeed;
[code]....
Perhaps I'll go with a box2d equivalent instead of trying out my own physics shenanigans.
View 2 Replies
Sep 19, 2004
Here I what i need is : Start drawing first circle and when first circle is on half way, Start second circle.same way second and third circles. and after completing 3 circles, just gotoAndPlay 2nd Frame .
View 3 Replies
Feb 18, 2010
I have a simple three ring animation where the three rings fade in and out.On the stage the rings are a perfect circle, in the publish preview they look fine, but once I publish the SWF, all of the sudden the rings are not perfectly round anymore.
They are almost perfect but right at the top and bottom there is just a small portion which has sort of "flattened out"...
View 2 Replies
Apr 26, 2011
I bought a Flash video tutorial online for Animating and the FIRST step is to create a circle with the circle tool, and the guy does it online, and it fills itself in. I repeat his actions exactly and I cannot get the same result at all. I just get a circle.
View 5 Replies
Jul 5, 2010
Does anyone know of any tutorial or code example that deals with resolving circle-circle collisions including rotation?
View 2 Replies
Jan 6, 2012
I have been trying to get this right for hours now it cant be as hard as I am finding it! but basically I have a circle and in that circle is a circle and all I want is for the inner circle to not be able to leave its parent. that's it but I just cant get it to work.
View 1 Replies
Jul 3, 2009
I'd like to make a circle slide ( Slider that on the shape of circle instead of vertical and horizontal Slider) like this one:
[URL]
Is there a ready Component on the web.
View 0 Replies
Jun 22, 2009
I have been given the task to create something similar to the flash navigation on the link below. I have tried googling things such as "flash image rotation", "flash rotation circle", etc?[URL]
View 1 Replies
Jul 2, 2009
I am trying create a rotating circle with buttons/menus around the edges and this would simply rotate around, not like a 3D carousel, just basic rotation of a circle triggered by movement of the mouse on a vertical axis!I have attached a jpg example to give you an idea of what I am trying to create.Would anyone be able to direct me to some tutorial something similar as I can't seem to find anything.
View 1 Replies
Dec 12, 2009
Is there a way I can arrange instances in a circle by their registration points?
View 6 Replies
Jul 27, 2010
How to draw a circle using action script (as a component) i tried some xample did not work.
View 2 Replies
Jan 7, 2010
I am making a simple drawing application, and i have come across a problem. Im not very good with trig at all so i got the code for drawing a circle and customised it and it goes a little dodgy. Could someone tell me why it is happening, and how i should fix it?
View 3 Replies
Apr 30, 2010
I need to get a random xy value from a circle, for example going to spread circles on stage randomly. Its quiet easy to spread the circle in a square. Here that was done.
var MC:MovieClip=new MovieClip();
var squareWidth:Number=200;
var squareHeight:Number=200;
[code].....
View 3 Replies
Dec 26, 2011
How do you get all the points that are on a circle?
I've already tried a for loop using the equation x^2 + y^2 = r^2 but so far it doesn't seem to be working...
I'd like to find out how because I want to place MCs dynamically on a random point that is outside a certain mc.
View 2 Replies
Mar 21, 2012
I have this animation to do that when you press a button a circle must be created with a twinning effect.
This is the sequence of the animation [url]...
View 1 Replies
May 20, 2008
I'm building a touchscreen project that consists of flash and max/msp using Olaf Matthes flashserver as bi-directional control.
how I create a function in flash that will provide me with the distance of a concentric circle, so that as it grows I can use trace() to give me a constant stream of it's x & y coordinates?
I've also implemented a collision detection between two or more circles for the purpose of an overlap function. Trouble being that it's not quite working properly. I want the overlap function for the purpose of morphing sounds between the intersecting parts of the circles.
Here's the code I'm using:
[Code]....
View 2 Replies
Jul 29, 2003
how do you make a line grow into a circle?
View 13 Replies
Nov 16, 2009
I am no master of Flash. I was wondering if there was a way to tween the radius of a circle to be placed on the circumference of the circle. I want a student to see the radius being transformed to a curve and then placed on the circle. I will be teaching my students the concept of a radian.
View 1 Replies
Aug 2, 2010
This is really stupid, but I'm absolutely stumped and have forgotten all of the math I used to remember from school. I've been trying to research how to calculate this problem, but it always involves 'solving for x/y' which I have completely forgotten how to do...I need to know how to find where the x intercept position where the h (height) from the bottom is variable. The circle is always centered at 0,0... so there's no need to factor any of that.he closest formula I've tried that calculates the x intercept is sqrt(h) where h is the y distance from the centre of the circle, but it's still not right.
View 3 Replies
Jan 30, 2011
I've created a circle and I need to draw equal separated ticks along ityou know like in a humanscale analogue machine.
View 5 Replies
May 7, 2005
i hav made me a circle and then made it an mc. But when i make it an MCand click a square appears around it. So when i play the game it doesnt do a precise hitTest, instead it hits around the circle, where the square appears when i click it in the editor...how do i stop it from hitTesting the square around my circle, and instead when it actually hits the CIRCLE?
View 5 Replies
Jun 12, 2009
I need to draw a circle like a pie chart. But I need the circle to only go around about 2/3's or whatever I choose. I've tried the 'curveTo' method but that didn't work. It makes the circle more bulged and not round like a circle.how to make a perfect circle with a slice taken out?
View 2 Replies