Professional :: Looping A Rotating Circle Without Wobbling
Apr 6, 2011
I try to make a looping rotating circle but I have wobbling during the rotation. It seem that the problem come from Flash. I tried manually on the timeline, by the code... but no results. I would expect a PERFECT circle! Here is an example of my result: [URl] You can download the .fla here:[URL] The circle is 2000px*2000px, center is -1000px*-1000px I believe this one also displays the problem in another way: [URL]
I try to make a looping rotating circle but I have wobbling during the rotation. It seem that the problem come from Flash. I tried manually on the timeline, by the code... but no results.I would expect a PERFECT circle ![URL]The circle is 2000px*2000px, center is -1000px*-1000px
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]
I have been working on this and thinking about it for days but I just can't seem to get it right. I want to have a circle that I can "pick up" with the mouse and then rotate (with the rotation point in the center). Currently I have done this with the following code:
PHP Code:
var radians = Math.atan2(mouseY-circle.y, mouseX-circle.x); var degrees = Math.round((radians*180/Math.PI)); circle.rotation = degrees + 90;
I have added a mouse listener for movement to the circle mc and then checked if a button was down. On button down this code would be executed on enter frame. This code works but the main problem is that I want to be able to "pick the circle up" at any angle and rotate it. If I pick it up with this code the circle automatically rotates to 90 degrees.
I have been working on this and thinking about it for days but I just can't seem to get it right. I want to have a circle that I can "pick up" with the mouse and then rotate (with the rotation point in the center). Currently I have done this with the following code:
PHP Code:
var radians = Math.atan2(mouseY-circle.y, mouseX-circle.x); var degrees = Math.round((radians*180/Math.PI)); circle.rotation = degrees + 90;
I have added a mouse listener for movement to the circle mc and then checked if a button was down. On button down this code would be executed on enter frame. This code works but the main problem is that I want to be able to "pick the circle up" at any angle and rotate it. If I pick it up with this code the circle automatically rotates to 90 degrees.
I need to make it so that when I click part of a circle, it'll rotate to show that bit at the bottom of the circle. I have managed to make this work for the first time you click, but beyond that it doesn't. My file is attached..
I'm currently working on a school project, where we have an arrow turning 360 degree around it's own center point. In the background there's a circle, which has been splitted up in 8 parts. The actionscript is as following:
Frame 1: var vinkel:Number = 0;
Frame 2: import flash.media.Sound; stop(); //En timer der opdatere hvert 1/1000 sekund var timer:Timer = new Timer(1); omdr_txt.text = "Omdrejninger: " + vinkel; [Code] .....
So it randomly turns a few rounds (usually between 2 and 3 rounds). Then when it, for instance stops at 15 degrees, or 1,05 rounds, then it will automatically go to a specific frame which has been defined for that interval (radius 0-15 for instance).
What I have is a circle image (for this purpose lets say it looks like a clock). For example: when you click 3 o'clock, the whole clock needs to rotate around with the 3 o'clock btn at the 6 o'clock position (with the pivot point in the centre). each of the 'time' positions (2 o'clock, 3 o'clock, 4 o'clock ...etc) needs to be a button and thus be able to rotate around to the 6 o'clock position. This would seem simple enough by just using a .rotate value or using tween movieclips...however the tricky part is:
The actionscript needs to determine which way the clock turns (anti/clockwise), dependant on where the clicked time-btn's position is. it needs to be some sort of if statement that says: If (3'oclock-btn) is positioned between 0 degrees (being original 12'oclock position) and 180 degrees (original 6 o'clock position), then rotate clockwise to the 6 o'clock position. If the (3o'clock btn) is positioned between 180degrees and 259 degrees (12 o'clock position), rotate anti-clockwise to the 6'oclock position.
I am trying to create a circle menu like the link below by searching through net I found some of the menus but not the exact one. Am attaching the menu which was created by me. The menu is not rotating properly. Link : [URL]
I have an idea of a game in my head and I wan't to get somekind of functional demo of it done in flash (CS3). I've looked everywhere but couldn't find tutorial for it, as I'm not sure what I'm looking for. I'm not that good in Actionscript. I'm now trying to describe this problem. On screen there's 4 rectangles, 2 in a row. So it's 2 rows with 2 rectangles in each. between all of them theres 4 circles. If I activate a rectangle with mouse and use arrow keys to rotate it smoothly 90 degrees, 2 nearest circles rotate with it. And same thing happens with all of the rectangles.
So I'm looking for somekind of solution where rotating an object also rotates every circle around it. and when circle rotates 90 degrees with rectangle as it's center point, it can be also rotated with another rectangle. I think I can't explain this clearly?
What I'm trying to do is make a dial-type of interface, where you click on a point on the edge of a circle and that point will rotate to another point at the top of the circle. What I can't figure out is how the make "Point B" rotate to "Point A", where "Point A" is always fixed at the top of the circle and "Point B" (and Point C and Point D, etc...) are located along different points on the edge of the circle. I'm using the tween function to rotate, so what I need to figure out is how to get the difference in the rotation between the two points.
I am trying to rotate some points around the center of the circle(0,0), however I'm getting weird values from the output. I've commented the problem code..
Code: var r:Number = 10;//radius var y:Number; var x:Number; var a:Number = 90;//angle of which the semi-circle is facing.. could be a random angle. var ax:Number;//rotated points [Code] .....
I am using the semicircle in BitmapData collision checking with getPixel(), with a moving circle...
How to make a point rotate about the circumference of a circle upon dragging. How do I go about doing it? Is there something to do with the startDrag(...); ? From what I have right now, I can move the point but not on the circumference of the circle.
I am still quite new to AS. I'd like to rotate a circle (compass_mc) around its centerpoint slowly forth/back with +/- 45 degree...or better with random degree. As file size is important, I can not solve it with MotionTween. Up to this time I applied this code to the MC, which endlessly rotates it: iranytu_mc.onEnterFrame = function(){ this._rotation+=1; } How to apply that sort of random slow forth/back rotation to the circle with AS?
I have a big circle with buildings all around the edge. There are two buttons that should control it. One to rotate the circle left, and one to rotate the circle right. I'd like each click of a button to rotate the circle and have it stop on a building, which then would activate an animation of the building.
I'm trying to create a radar effect (a looping circle which gets larger). Now, the way i do this with other programming languages is to draw a rectangle as the background with a low alpha amount. Then draw the circle growing on top of the background, then draw the background again in the loop.I've got it working like this in flash but it gets really slow after a very short time since I am adding children each time the loops goes through.
Code:
var radarSize:Number = 1; stage.addEventListener(Event.ENTER_FRAME, loop); //-----------------------------------------------
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"...
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.
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?
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.
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.
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.
how to create flash movies but the damn program is too complicated. Been trying to figure out how to create a shape inside it as it doesnt want to import any image I have into the library.Is there a way to just create a simple circle?
Simple animation..I want to rotate a circle with a cut in (looks like pacman).I want to rotate i 1 x clockwise and devide this animation in 4 parts. so if you think of a clock it goes, 9, 12, 3, 9, ...The rotation works perfect until i start adding the keyframes and adjusting the rotation, at some point it always goes wrong.. insted of going the right way (clockwise) the circle starts to move counter clockwise.. I have to add some extra keyframes to keep the rotation on track, this result in a not so smooth rotation.
ps: Just to make my self clear, it happents only once you start to manualy rotate and adjust pacman - this is a must since i have to have keyframes in certen points (when the packman is at 90 degree rotation) [URL]
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 .
I have a banner that I'm creating, it has 5 images that rotate via motion tweening. I've created an invisibile button (and also attempted to create multiple buttons) so that when you click on a specific image it will bring you to that URL. So far I have only gotten it to work for the final URL. No matter which image I click on, it only brings up that last URL. Here is my code: