how to randomly animate circles moving around inside a bigger circles? the small circles will have a collision effect on each other and on rollover of each individual circle, the name of it will come out in the bottom.. so the big circle will act as a wall preventing them from coming out..
I am trying to make a spaceship game and in order to make it look like my spaceship is moving I need to make my circles in the background move forever. I tried using the Continuous Movement tutorail but it makes my circles get bigger when I move my mouse and when I move my mouse all the way to the right it gets faster and left gets slower does anyone know how to change the actionscript for the circle movie clip to make it not do those things?
anyone know of any tutorials or any codes on how to randomly animate circles moving around inside a bigger circles? the small circles will have a collision effect on each other and on rollover of each individual circle, the name of it will come out in the bottom.. so the big circle will act as a wall preventing them from coming out.. yeah, by the way i have attched the file so more or less u will understand wat im saying.
I've bee following this site for a long time, and now I finally got a question on my own.
I'm trying (by ActionScript) to make a bunch of small circles form a complex shape e.g. a star or a windmill.
I'm planning to draw on circle and draw it to bitmap date, but I don't know how to place a lot of circles in the shape of a complex shape (or how to transform them into another complex shape).
Basically what I am trying to accomplish is to make a rotating menu comprised of circles that are spinning at a slow constant speed, and when the mouse goes over a circle(button) the menu stops rotating.
I got to create an app with 3 draggable circles. (Red,Green,Blue). At the centre overlay the RGB needs to display the mixed RGB. I.e if red and blue, overlay display magenta. If green and red overlay display yellow. If red, blue and green overlay display white, etc.
I want to use semi transparent circles to show the intensity of the effect by altering the radius of the circle and animate it while placing them. for example it appears as a dot and then grows to the intended size in fraction of a sec.
I could see some functions in javascript API but not in Flex. Saw some examples that uses polygon. But i dont want to plot all 360 points for just one circle.
import flash.display.Sprite; var bin:Sprite = new Sprite(); var cir:Sprite = new Sprite(); cir.graphics.beginFill(0x00ff00,1); cir.graphics.drawCircle(0,0,30); cir.graphics.endFill(); bin.graphics.beginFill(0xff0000,1); bin.graphics.drawRoundRect(40,40,100,100,5,5); bin.graphics.endFill(); addChild(bin); bin.addChild(cir); Here why do the circle added outside the square box?
I can make images transparrent and tween etc. I want to create an animation (like this one), if someone can please help put me in the correct direction? I am not sure how to get the circles animated to get the next image to display.
The issue I am having is how to tackle forming a logo using circles. I have done one letter manually, however it would take forever to do this with every single letter, and so I am asking here if anyone knew of a faster method. Requirements:
- Has to fill non-circular letters(i.e. does not have to be precise, but look like it has edges)
- Circles have to animate in, therefore they need to have drop shadow and seem like they are landing in place
I've got the code for circle on an image (mask). I've got it in my first frame and I need do something else in 2nd frame but after the movie in 1st frame is finished. Code: //This container contains all the circles that act as a mask for the picture var container:Sprite = new Sprite(); //Assign the container to be the image's mask picture.mask = container; //Add the container to the stage addChild (container); /*
This timer is responsible for creating a circle every 0.05 seconds. A total of 20 circles will be created. */ var timer = new Timer(50,20); timer.addEventListener (TimerEvent.TIMER, createMaskBall); timer.start (); //The timer calls this function every 0.05 seconds function createMaskBall (e:Event):void { [Code] .....
I have been working on a drawing "game" in my spare time (which is limited). This is probably a common question, if so I appologize. By the way, I do not have the code here, it is on my other computer. Anyway, I was using the lineTo method and a timer listener to fire the addition of each new line segment, if that makes sense. The problem is that when you try to draw an arc quickly, it looks terrible. It draws straight lines. I tried adjusting the timer, which helps a bit but still not great. I looked at the curveTo but could not figure out a logical way to get the achor coordinates. I did some research online and found some that use addChild with bitmaps. I would rather use lines. Has anyone tackled this before?
I am looking for a way to draw circles using the mouse using the lineTo method, but need a way to find when collision occurs between the line that you're drawing and the line that's already on the screen.
My problem is I need to generate numbered circles ( from 1 to 100) and I need to make them click able. When I click the circles in order (i.e. 1, 2 , 3...etc) the clicked circle should change color or get disabled (to indicate it is clicked). I should not be able to click the next numbered circle until I press the previous numbered circle and there should be a counter to show how many correct circles are clicked.
I am trying to code some circles to move around inside one another. I have managed to do the hit test bit, but its getting them to stop at the edge inside one another is what I am having problem with. The aim is so the user can drag the red circle and the yellow stays where it is within the red, but when you drag the yellow circle the red moves with it.
I have used Kirupa's tutorial on vibrating circles and dont know how to turn it off.I am using the circles in Scene 1 and want them to disappear when you enter into Scene 2.
I've been messing with some code from lionbichstudios.com. I'm looking for a way to have 5 circles appear in succession and expand and fade away. Works fine for one circle but I haven't found a good way to create a sequence of circles. The one hitch: the code needs to appear all in one frame. (I'm using Flash MX 2004)
"How do I get 2 circles to bounce off eachother correctly??". I am currently making an air hockey game. I have seen great physics explanations, and great swf's, but I can't seem to do it myself. I know how to get the puck to bounce off the walls, and that code is very stable/simple, but the hitter-against-puck collision is very elusive. Bit-101 has some great swf's on flashkit forums about the exact same thing I am looking for. I have heard of somebody on super samurai giving a great explanation. I have seen a physics student's explanation. It seems to be a lot of code involving the radii of the circles, and the only thing I really understand is this:
r1 = radius of puck | r2 = radius of hitter | d = distance between them if r1+r2 > d, then they have collided.
Here is my puck-against-wall code: onClipEvent (load) { speed = 0; dist = 0; dx = 1; dy = 1; [Code] ..... So anyway, obviously that code is inside of the puck.
I have used Kirupa's tutorial on vibrating circles and dont know how to turn it off. I am using the circles in Scene 1 and want them to disappear when you enter into Scene 2. I know very little about actionscript and am asking for help. I am including the .fla
I'm creating a mask in what can best be described as a glorified spotlight effect program. It involves dynamically creating a gradient circle that will be the spotlight in question. However, I've run into a problem while creating gradient circles dynamically.
Code: // in CS4 var testCircle:Sprite = new Sprite(); testCircle.cacheAsBitmap = true; // this can be true or false; doesn't fix the problem
[code]....
However, no matter what you put as CIRCLE_RADIUS, this will always output an approx 100-radius gradient in the center, and whatever is left over will have 0.0 alpha the rest of the way.So if you make one with a radius of 300, it'll show up as a circle with radius 100 and 200 pixels either side of blank space.Intersetingly enough, if you set the radius to less than 100 (say, 80), it'll cut off the circle at the radius and leave you with a hard edge.
I've found that if you set the ending alpha to anything other than 0.0, the full gradient is rendered. But I don't really want a hard edge Of course, fancy matrix transformations can fix this. But even those are unpredictable for some strange reason...even an identity matrix scales it drastically.Or do I have to go with pre-rendered ones or fancy matrixwork?
i'm "experimenting" a bit with code at the moment and now i have written a class that creates a circle that bounces at the bottom of the stage. Wich has a random size and a random starting point.But now i wan't to expand the code so that i can have a random amount of balls bouncing down, so instead of only one there are f.e. 3 balls.Also i have noticed that the stage.stageHeight does not get updated when i resize my screen when i run iton how to make that happen ?
When I am drawing with a pencil, the line looks like the shape I want to draw, but when I stop drawing, the shape reshapes to another shape whick looks like circles and rectangles = it does not look like the shape I wanted to draw. What is the problem?
I need to draw concentric circles in my Flex application. I am trying to do this using graphics util. The problem im facing is centering the two circles.
I'm trying to draw two circles at random positions, and draw a line between those two circles - but flash doesn't seem to register the x|y coordinates of the circle in my code.How would I do this. Better yet, how would I do this so that if I were to drag one of the circles, the line would maintain the connection between those points? Here's my code:
var sw = stage.stageWidth; var sh = stage.stageHeight; var cr = 6; //circle radius
I'm trying to create a flash app which creates and positions circles around the circumference of a circle. My issue is that my grasp of trigonometry is flimsy at best and I'm struggling to create the code.
Here is what I have so far (Called rotation matrix, because that's eventually what I will be using on it):
ActionScript Code: package com { import flash.display.MovieClip; import flash.display.Sprite;
I was wanting to do a quick class that generates an image from another image similar to the way the Killers "Day and Age" album looked like: [URL] The problem I'm running into (mentally, haven't started coding yet) is that I'm not sure how to place all those randomly sized and placed circles on the stage in such a way that they will completely fill it.I have thought of two methods, but both seem inefficient:
1. Use Box2D to create a new area where randomly sized circles drop from the top of the screen and fill the screen. Then, when all circles have settled, just track the size and position of each.
2. Select a random spot on the screen. Create a new circle, and test how big it's maximum diameter can be until it bumps into other circles or reaches a set maximum diameter. If it cannot become larger than the smallest allowed diameter, don't place a circle there, but move on. Repeat until too many tries in a row don't allow you to place any more circles.