Circle And Points (AS)
Hi! I have this code, but I assume you must look at my fla too see what I mean. mc and mcx are two circles, mc has a line on it.. Now the mc movieclip runs in a circle and the mcx movieclip are put in a circle so all the points build up a circle. The line on the mc-movieclip shal be the radius, but I don´t know how to make the end of the line be in the middle of the circle while the citcle in the other end of the line is moving round the circle. I hope you understand what I mean and can help me out.
Code: var angle = 0; var radius = 50;
onEnterFrame = function() { mc._x = 200+Math.cos(angle) * radius; mc._y = 200+Math.sin(angle) * radius; angle += .1; attachMovie("mcx", "mc_1", getNextHighestDepth(), {_x:mc._x, _y:mc._y}); }
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 08-11-2006, 01:44 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Points Of A Circle
I'm looking to see if anyone knows where/how I can get at least 40-50 different points of a circle with a radius of 5. I have some points but I would like to have twice as much and can't figure out how to get them.
Thanks to any
Getting Points Of A Circle
I am making a flash game where there is a room and in it is a whole bunch of circles hanging from a string on the roof.
There are multiple circles on the roof that swing back and forth.
I want to make it so if they hit one another they will bounce off each other.
So to do that I need to get certain points of a circle around it's circumferance,
so I can then test if one of the circles hits another circles point eg.
Code:
balls = new Array();//each ball adds it's InstanceName to this array
onEnterFrame = function() {
for(var b = 0; b < balls.length; b ++) {
cb = _root[balls[b]];//CurrentBall
for(var p = 0; p < cb.points.length; p ++) {
cp = cb.points[p];//Current Point - each point is an object
if(cb.hitTest(cp.x,cp.y,true)) {
//do something here to make the balls bounce off each other
}
}
}
}
But i need to get all th points of the circle (or a rough amount otherwise the loop will make it lag).
So say the point at 0*, 45* 90* etc.
can anyone good at geometry out there help!
or find an alternate method
any help would begreatly appreciated
Draw Random Points Within A Certain Circle
Just need a code that will draw randomly, single points within a circle with a diameter of 450 or failing that, draw the random points within a square (say 350 x 350 pixels). Or if you could jus tell me how to get it to draw randomly o0n the screen then it's a start!!
Thanks alot, (thanks in advance!)
Dave.
Dynamically Placing Points On A Circle
Need a mathamagician here...
Let's say I have x number of points (which will vary each time the flash loads) and I want to evenly dipsperse these points around a circle with a known radius. I have a vague idea from the searching I've done that I need to divide the radians into equal amounts and then calculate the x,y for each based on the radians and radius. However, the math is beyond me - don't even really know where to begin with this. Can anyone help?
Thanks in advance -
Moge
Intersection Points Of Line On A Circle
Hi all,
I have a bit of an algebraic problem, and my lack of attention during math is starting to show. I was experimenting with hit detection based on lines for a simple shooting game, and the enemies bieng circulair.
I already have a function to check the distance from the line to the circles centre, so I already know that there is a intersection (or hit). I also would like to know where it intersects, for graphics and some extra physics.
So here's what I got:
Known:
r
m
b
so these can be considered constant
Equitions so far
y = mx+b
r^2 = y^2 + x^2
this gives:
r^2 = (mx+b)^2 + x^2
And then my troubles begin, because writing that out would give:
r^2 + b^2 = x^2 + mx^2 + 2mbx
Googling around tells me that this is the way to go, and you should get a quadratic function, but I don't know how to solve this kind of equation. Can anybody help out? I hope to finish a prototype soon.
Tnx in advance,
TO
Plotting Points On A Circle, Like A Radar.
Plotting points on a circle, like a radar.
I’ve been working with this one code for a while now that plots points in a circle where the center of the circle is today’s date and the out edge is 2 or 3 years out. The code places each point the correct distance from center randomly around the center point. It’s been working great, but now my boss wants to see the circle split into 4 quadrants. Now the points need to be within one of the quads dependant on two variables (area & port). I think the easiest way to explain it is that the circle is cut up like –
Top half = application
Bottom half = infrastructure
Left half = global wide
Right half = area wide
The math is really too far over my head at this point, so I’m hoping someone has the knowledge to help out with this.
If you put the code on the first frame and add a circle MC to the stage, call it myCircle, and have a point in your library with the id myPoint you can run this to see it work
Code:
Attach Code
circle = myCircle;
pointer = 'myPoint';
years = 2;
dates = [new Date(2008, 1, 1), new Date(2008, 1, 1), new Date(2008, 1, 1), new Date(2008, 2, 26), new Date(2008, 1, 1), new Date(2009, 1, 1)];
dates2 = [{date:new Date(2008, 1, 1), area:"global", port:"application"}, {date:new Date(2007, 12, 1), area:"area", port:"application"}, {date:new Date(2008, 11, 1), area:"global", port:"infrastructure"}, {date:new Date(2007, 11, 1), area:"area", port:"application"}];
counter = 0;
today = new Date();
edge = new Date(today.getFullYear()+2, today.getMonth(), today.getDate(), today.getHours(), today.getMinutes(), today.getSeconds(), today.getMilliseconds());
pdates = dates2.slice(0);
plotter = setInterval(plotPoints, 100);
function plotPoints() {
var cIndex = random(pdates.length);
var cDate = pdates[cIndex].date;
pdates.splice(cIndex, 1);
var percentage = (today.getTime()-cDate.getTime())/(today.getTime()-edge.getTime());
var dist = circle._width/2*percentage;
var angle = random(360);
//var angle = random(90);
//var angle = Math.round(Math.random() * (90 - 45 + 1)) + 45;
trace ("angle " + angle);
var myNumber = angle/2;
var rads = angle/(Math.PI/180);
//var rads = angle/(Math.PI/myNumber);
trace ("rads " + rads);
var sin = Math.sin(rads);
trace ("sin " + sin);
var cos = Math.cos(rads);
trace ("cos " + cos);
var y = sin*dist;
var x = cos*dist;
trace (y + "y x" + x + "
");
var centerX = (circle.getBounds(circle._parent).xMin+circle.getBounds(circle._parent).xMax)/2;
var centerY = (circle.getBounds(circle._parent).yMin+circle.getBounds(circle._parent).yMax)/2;
//trace(centerX + " " + centerY);
cPoint = circle._parent.attachMovie(pointer, 'point'+(++counter), circle._parent.getNextHighestDepth(), {_x:centerX+x, _y:centerY+y, date:cDate});
//
//
cPoint.onRollOver = function() {
_root.createTextField('tooltip', _root.getNextHighestDepth(), _root._xmouse, _root._ymouse, 0, 0);
_root.tooltip.border = true;
_root.tooltip.background = true;
_root.tooltip.backgroundColor = 0xFFFFCC;
_root.tooltip.selectable = false;
_root.tooltip.autoSize = 'left';
_root.tooltip.text = y+ " y x " + x;
cPoint.onEnterFrame = function() {
_root.tooltip._y = _root._ymouse-_root.tooltip._height;
_root.tooltip._x = _root._xmouse;
updateAfterEvent();
};
};
//
//
cPoint.onRollOut = function() {
_root.tooltip.removeTextField();
delete this.onEnterFrame;
};
//
cPoint.onPress = function() {
_root.drawMyLines();
};
//
if (pdates.length == 0) {
clearInterval(plotter);
}
//
}
Plotting Points On A Circle, Like A Radar
I’ve been working with this one code for a while now that plots points in a circle where the center of the circle is today’s date and the out edge is 2 or 3 years out. The code places each point the correct distance from center randomly around the center point. It’s been working great, but now my boss wants to see the circle split into 4 quadrants. Now the points need to be within one of the quads dependant on two variables (area & port). I think the easiest way to explain it is that the circle is cut up like –
Top half = application
Bottom half = infrastructure
Left half = global wide
Right half = area wide
The math is really too far over my head at this point, so I’m hoping someone has the knowledge to help out with this.
If you put the code on the first frame and add a circle MC to the stage, call it myCircle, and have a point in your library with the id myPoint you can run this to see it work
Code:
circle = myCircle;
pointer = 'myPoint';
years = 2;
dates = [new Date(2008, 1, 1), new Date(2008, 1, 1), new Date(2008, 1, 1), new Date(2008, 2, 26), new Date(2008, 1, 1), new Date(2009, 1, 1)];
dates2 = [{date:new Date(2008, 1, 1), area:"global", port:"application"}, {date:new Date(2007, 12, 1), area:"area", port:"application"}, {date:new Date(2008, 11, 1), area:"global", port:"infrastructure"}, {date:new Date(2007, 11, 1), area:"area", port:"application"}];
counter = 0;
today = new Date();
edge = new Date(today.getFullYear()+2, today.getMonth(), today.getDate(), today.getHours(), today.getMinutes(), today.getSeconds(), today.getMilliseconds());
pdates = dates2.slice(0);
plotter = setInterval(plotPoints, 100);
function plotPoints() {
var cIndex = random(pdates.length);
var cDate = pdates[cIndex].date;
pdates.splice(cIndex, 1);
var percentage = (today.getTime()-cDate.getTime())/(today.getTime()-edge.getTime());
var dist = circle._width/2*percentage;
var angle = random(360);
//var angle = random(90);
//var angle = Math.round(Math.random() * (90 - 45 + 1)) + 45;
trace ("angle " + angle);
var myNumber = angle/2;
var rads = angle/(Math.PI/180);
//var rads = angle/(Math.PI/myNumber);
trace ("rads " + rads);
var sin = Math.sin(rads);
trace ("sin " + sin);
var cos = Math.cos(rads);
trace ("cos " + cos);
var y = sin*dist;
var x = cos*dist;
trace (y + "y x" + x + "
");
var centerX = (circle.getBounds(circle._parent).xMin+circle.getBounds(circle._parent).xMax)/2;
var centerY = (circle.getBounds(circle._parent).yMin+circle.getBounds(circle._parent).yMax)/2;
//trace(centerX + " " + centerY);
cPoint = circle._parent.attachMovie(pointer, 'point'+(++counter), circle._parent.getNextHighestDepth(), {_x:centerX+x, _y:centerY+y, date:cDate});
//
//
cPoint.onRollOver = function() {
_root.createTextField('tooltip', _root.getNextHighestDepth(), _root._xmouse, _root._ymouse, 0, 0);
_root.tooltip.border = true;
_root.tooltip.background = true;
_root.tooltip.backgroundColor = 0xFFFFCC;
_root.tooltip.selectable = false;
_root.tooltip.autoSize = 'left';
_root.tooltip.text = y+ " y x " + x;
cPoint.onEnterFrame = function() {
_root.tooltip._y = _root._ymouse-_root.tooltip._height;
_root.tooltip._x = _root._xmouse;
updateAfterEvent();
};
};
//
//
cPoint.onRollOut = function() {
_root.tooltip.removeTextField();
delete this.onEnterFrame;
};
//
cPoint.onPress = function() {
_root.drawMyLines();
};
//
if (pdates.length == 0) {
clearInterval(plotter);
}
//
}
Find 4 Corner Points/divides Of Circle Using Math
Hey
I have this little file I'm working on at the moment where a ball is rotating around an oval shape. This works and is looking good. What I want to do now is to create 3 more instances of the ball sprite and I've created and position them in the other 3 corners of the oval.
So it looks sort of like this to start off with:
----o
o ----- o
----o
(ignore the dashes, I just put them in there to I could illustrate the '4 corners')
I want all the balls to follow the same path and same speed etc. I'm assuming that there is some simple math formula I need to know but it's sort of going over my head at the moment.
Here's the code I'm working on:
Code:
package {
import flash.display.Sprite;
import flash.events.Event;
public class Oval extends Sprite {
private var ball:Ball;
private var ball2:Ball;
private var angle:Number = 0;
private var centerX:Number = 200;
private var centerY:Number = 200;
private var radiusX:Number = 200;
private var radiusY:Number = 100;
private var speed:Number = .1;
public function Oval() {
init();
}
private function init():void {
ball = new Ball();
addChild(ball);
ball.x = 0;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(event:Event):void {
ball.x = centerX + Math.sin(angle) * radiusX;
ball.y = centerY + Math.cos(angle) * radiusY;
angle += speed;
}
}
}
I've included the files I've been working on so you can see.
Any help would be greatly appreciated.
Cheers!
Frame Independent Circle To Circle Detection
I am having trouble trying to get my head round this part of programming.
I know it is used for detection between movieclips such as snooker balls. I just cant get my head around it and it is driving me nuts!
Does anyone know of any good tutorials that I can use to solve this problem?
Thanks
The Toffee
Using Actionscript And The Drawing API To Animate A Line (2 Points) To 2 New Points
hi everybody - what is the best way to go about this?
at its most basic - i need to animate a line's beginning and end points using tweener to 2 new points somewhere else on the stage.
my first thought is to start with the excellent 3d spinning cube example that kirupa made on kirupa.com and backtrack from there.
http://www.kirupa.com/developer/acti...ces_depths.htm
but i'm hoping to find a much simpler and efficient way of accomplishing what i need.
the problem that i know i need to get around is this.... i have to find a way to have the Tweener class give me updated positions of the x and y of the two points which make up the lines. and somehow i have to use the drawing api to 'get inside of' tweener to update the stage accordingly - reason for this is that these lines will need to use the elastic tween and bounce around a bit.
i'd appreciate any help
cheers! - tom
Convert WMV File With Defined Cue Points To FLV And Keep Cue Points?
Hello, I need to know how to do this. I have wmv files with defined already cue points. I want to convert the video in to a FLV to play it over the net with flash, but I want to keep the cue points defined in the wmv. Is there a way to do this automaticaly or can I save the script lying under the WMV file defining the cue points in to a flv script. It is important that everything is done almost automaticaly because I have a lot of wmv files....
Help
thank you in advance
Circle Collision Plus Direction Circle Should Go
I need help (or code) on how to figure out the direction a circle should go after it is hit by another circle. I know how to get the circles to know when they hace hit each other but i need to know how to find the angle at which the circle would bounce off at. Thanks to anyone who can help.
Moving A Circle Over Half A Circle
how do i move over the half circle
up and donw the circle line?
how do i move it to a certain point?
and how do i calculate it for example 5 point that will be in equal spaces between the circles?
thnaks in advance
peleg
Circle-circle Reactions, With A Twist..?
All right, I'm not as dumb as I sound -- no, really! But here's what's got me stumped:
I have a series of circles that gradually spin toward the center of the screen. The circles are randomly placed at the outer edge of the screen and randomly assigned a speed. Because the balls don't travel in a linear fashion, I'm having trouble figuring out how to adjust their movement. As the circles get closer to the center, they also get "spun" a certain amount -- they have a property called "theta" that gets appended with another property called "spin." Anyway...
I can detect when a collision is taking place: I'm just completely blank regarding how to make the circles react. I've searched a bunch of places, but nothing I've found is making any sense to me...and I'd like to think that I'm not brain-dead...
If anyone has any suggestions, I would LOVE to hear them! Thanks in advance!
Regards,
Blake
Moveable Circle Around Another Circle - No Overlap
Hey all. 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. Any suggestions, comments, or help is greatly appreciated. Thx.
Drawing A Animated Circle, Dot To Circle
Can some one help me??
Im new in Flash, I want to make an animation of a circle, begining from a small dot and ending in a circle (like wen we draw in a paper), I allready tried everything I know (not a lot!!!! ) .
Is it possible to make this? I will trie to explain:
I want to make a animation of a small pencil drawing a circle from nothing. Begining with the pencil drawing a dot then that pencil will make the complete circle like wen we draw in a paper by hand.
Sorry my English is not very good.
Please Help!
Arcanjo
Circle-Circle Detection
I need some serious circle to circle collision detection. I used one from jobe makar, but I don't think it works for circles that are'nt both moving. Some of the variables are 0, so when it divides by them, it returns NaN. Anybody know any collision detection scripts? <--Sorry, I just wanted to put that in there
Circle Vs. Circle Ricochet.
I'm working on a game that involves circle vs. circle collision detection (More specifically moving circle vs. static point). I am able to project the circle out of the point but I have no Idea how the change the velocity of the circle so that it is physically accurate.
I whipped up a quick thing to Isolate the circle vs. point collision here.
Here's the script:
Code:
var GRAV:Number = .22;
var RADIUS:Number = ball.width/2;
var vx:Number = 0;
var vy:Number = 0;
var dx:Number = 0;
var dy:Number = 0;
stage.addEventListener(Event.ENTER_FRAME, enterFrame);
function enterFrame(Evnt:Event):void {
ball.x += vx;
ball.y += vy;
vy += GRAV;
dx = ball.x - dot.x;
dy = ball.y - dot.y;
if (Math.sqrt(dx*dx+dy*dy)<RADIUS) {
ball.x = dot.x+dx*RADIUS/Math.sqrt(dx*dx+dy*dy);
ball.y = dot.y+dy*RADIUS/Math.sqrt(dx*dx+dy*dy);
// I have no Idea what to put here to simulate ricochet
}
}
If anybody could tell me how I would manipulate the vx and vy variables that would be grand.
Finding Points Between Two Points
This seemed more likely to be answered here but if this belongs in Math and Physics please move it.
If I were given the following coordinates, how would I calculate the end points of the red segments? There's a 5 point gap between the endpoints and the corners.
EDIT: I've written the function, I just need the math.
Circle
I'm having difficulty making an object (circle) go around a guide layer (also a circle). My circle only goes half way. Is there a way to place the circle at a starting point and have it go all the way around the guide layer and finish at the starting point? I've been able to do essentially creating a duplicate guide layer and a duplicate object and having the object complete the movement of the other half of the circle.
I've seen it done so I know it can be done. Thanks in advance.
Arc And Circle
Hi people. Well here is my question:
I have a big circle which is always a constant size. Now my navigation is dynamic and the amount of small circles on this big circle's arc has to be devided evenly on this arc of the big circle, now what I am trying to do is see ho many menu items I have, work out the angle between them to space them evenly on the big circle....
I'm totally confused in how to approach this. The thing is I have all the functionality for the duplication, all I need is a function to work out the plotting of the small circles on the big circles' arc...
Thanx in advance
Circle..?
emm..could someone tell me..how to write an actionscript..that draws a circle in real time...slowly..or...how to make such animation..or whatever..tnx
What Is The Circle In A MC?
I noticed that MC has + sign (crossed hair) which is the registration point of the movie clip. This is where (0,0) of the object. I also noticed a circle that sometimes it's inside but sometimes it's outside of my movieclip. What is that for?
TIA,
Circle Instead Of Bar
how can i create of a circular preloader, it is just like a normal bar that fills up when loading but instead make it circular
Circle Tween
How do i make a dot on the screen into like a circle. Like... use a tween to start with a point of something similar then go around and extend into a circle. Anyone understand? Basically, it starts out with a point then it goes around and makes a circle.
Rotating 3d Circle
How do i rotate a circle and give the affect that it is 3d, with an image on the 3d circle.
like the 3d circle at matinee.co.uk
Circle's Equation....
Hi
Can somebody tell me what is the equation for the "circle" in maths?
as i am trying to do something in AS to assign the MC to move in a circle...
Thanks in advance...
MKit de HK
Tweening A Circle
Im tired so give me a break on this one, but I want to TWEEN a circle STROKE ONLY! No fill, I want it to tween the outline around the circle. --You know, like start with nothing then start going around with some color to make a complete circle
For the life of me I cannot think of how to do this. I though of making 4 level with four straight lines that cover up the circle and tweening them in order...but is there a better way?
Am I missing something easy?
thanks! tv
[Edited by TVance.Net on 01-30-2002 at 01:51 AM]
Cutting In A Circle? Help
Listen I have pictures that I want to be perfectly round in Flash and cant for the life of me find out how to cut these out!
When I import into Flash it comes in like a square or rectangle or whatever and I break it up, and I want the very center (they are pics of people) in a Circle to be the only thing left...
Someone help..please?!?
Spinning Circle
I have a circle that is filled. I now need this circle to spin on the screen. I will have another layer on the circle that will have some text on it, but I don't want the text to move. How would I go about getting the circle to spin in place? (I tried doing the rotate thing, but that is not the effect I'm looking for - it actually moves the circle as it does the rotate...) I have to have the circle stay in the same spot all the time while spinning.
Thanks,
Kathi
Circle - How To Animate?
Hey~
Thank you for taking time to look in to this post.
I have a problem (probably quite a minor one) but am clueless as how to solve it.
I want to animate a circle being drawn through scripting.
Is it possible? If so, how?
If it can't be done, is the only way to do it through drawing a frame by frame progression of it?
Once again, Thank you~
Cheers~
The 4th Circle Hates Me
4th circle "contact" won't keep in line...what is wrong with my script?
you can see the swf here:
http://www.eight.nl/test/circletest.swf
my script is
Code:
onClipEvent (load) {
navigation = ["info", "divisies", "agenda", "contact"];
max = navigation.length;
i = 0;
function Circle() {
Radius = 200;
Speed = 3;
for (i=0; i<max; i++) {
_root.attachMovie("Box", "Box"+i, i);
var targ = _root["Box"+i];
targ.attachMovie(navigation[ i ], "mc"+navigation[ i ], 1);
targ.Rotate = i*(360/max);
targ.onEnterFrame = function() {
xpos = (targ._x - _xmouse);
if (xpos<=0) { this.Rotate +=Speed
} else {
this.Rotate -= Speed
}
this._x = 380+(Math.cos(this.Rotate*(Math.PI/180))*Radius);
this._y = 280+(Math.sin(this.Rotate*(Math.PI/180))*Radius);
};
}
}
Circle();
}
does anyone know what i'm doing wrong in my script?
(problems: contact doesnt keep in line, when mouse is held still the rotation jerks)
Circle To Square
i'm trying to change a circle to a square, but the shape tweening wouldn't work. any suggections?
Help Making A Circle...
Does anyone have a good code for howto draw a cirlce using moveto and curveto? In flash's explanation it has a code but its a square with rounded corners and isnt quite a cirlce. Thanks alot. I want it for http://phildman14.homeip.net/flashmx/paint/v1.swf
Fill My Circle :)
Every time you think you are well and truly past the newbie stage something comes along and brings you back to earth. In my case it's a malformed circle.
Picture if you will a circle (the bottoms been flattened a little) and then imagine filling the circle with a colour. Doesn't sound so hard does it? We're talking flash basics here. But, well, this particular circle of mine refuses to be filled with a colour. It's not grouped or anything, and the frame properties box suggests all is well (and filled). The shape was once part of a shape tween, but I copied a key frame (and removed any notions of tweening in the frame box) to arrive at my current situtation.
So what is my problem (in the very specific case )
Regards
Shan
Circle Percentage. How To Do This?
Hello,
I created a preloader which includes the variable "Percent". This variable gives the loaded percentage of the .swf file.
1) I have a circle inside a MC. I want the circle be a line, when Percent is 0, and to become a circle when Percent is 100.
Imagine a circle being 1/8 then 2/8, 3/8 and so on.
2) I also want a line to start as vertical and change its angle from vertical position to vertical position again, doing 360 degrees, while Percent goes from 0 to 100.
How to do this?
Thank You,
Miguel Moura
Circle Motion
I cant get my mc to move in a circle motion.
here is the as
onClipEvent (load) {
radius = 10;
degrees = 0;
}
onClipEvent (enterFrame) {
angle = degress*(Math.PI/180);
degrees += 2;
xposition = radius*Math.cos(angle);
yposition = radius*Math.sin(angle);
this._x = xposition+_root.cross._x+1;
this._y = yposition+_root.cross._y+1;
}
What is wrong with it.
cross is the center of the rotation. It is a mc called cross lol.
Masking And Circle
Ok first question. I am just learning flash and i am doing the lessons that come witht the program and they just had me creat a layer mask and that was it can someone breifly tell me what the point is of a layer mask? thanks.
Second question. I was just woundering if someone could tell me ohow to creat a circle or a square that dose not have a fill. i want to have a circle that is drawn with a dotted line but i can see through to the layer under it. Thanks Oh and while i am at it i might ask if there is an easy way to make stars?
How 2 Do Smart Circle?..can U Help Me?
..
" (english is not my mother languge) "
_______________________________________
hi all,,,
i want a code ( i hope .fla file ) to do the folowing:
circle, stopped , rotate clockwise while rotation speed from zero increase then increase then increase, until speed at highiest value "choose Any value u want and tell me how can i change it"
then speed dicrease, dicrease, dicrease until speed = 0 , then rotate counterClockWise in smae idea..
am I claer?! i hope that,
thanks a lot
nehaya
Drawing A Circle
This may seem simple to you guys, but I haven't used flash for ages...so I'm a little rusty.
Anyway, what I want to do is to make an animation where it looks like a circle is being drawn - like you would by hand. I've tried using a mask, but just can't get it to work.
I was wondering if I can do this using actionscript, I'd prefer to use actionscript.
Drawing A Circle
Hi
Using FlashMX. I want to make an animation where it looks like someone is drawing a circle. I know how to do this without actionscript, but I'd much prefer to use actionscript to do this. Please someone show me the light!
BTW I haven't used flash for a while, so I'm VERY rusty...
Dot - Circle - Trail
Can anyone help me!
I want to make a black dot follow the path of a circle and for the dot to leave a gradient trail behind it.... so by the time the dot has done a full rotation the trail is gone and ready to start the rotation again?
Is this even possible?
Circle To Square? Possible?
yeah im a crazy beginner and i wanna turn a circle into a sqaure. how the mother do i do that? i thank in advance whoever helps me. it is ten thousand times appreciated!
--crazy joolie
Rotating Circle
I have a cirlcle of buttons for the main page of a website I am creating. I want to have the whole circle rotate slowly at all times, except when the user mouse-overs one of the buttons. When the user does that I want the circle to stop rotating at that point. If the button is clicked it stays like that even with mouse-off. If the mouse is taken off without the button being clicked I want the circle to continue rotating.
The problem is that the movie clip containing the buttons continues to rotate when I mouse-over a button. Thanks in advance for the help.
Text In A Circle
Is there an easier way to make text take the shape of a circle without breaking it up and placing each letter?
Thanks
3D Circle Nav Menu
G'Day FK,
Looking for some source code to get me started on a menu that is similar to the Mac OS menu, but operates in a 3D perspective circle instead. Ive seen works similar in the past, but not quite sure where to find them now that I need them. Im searching FK now to no luck, if someone could point me in some direction Id appreciate it!
Geoff
Building Up A Circle
Hi guys, I was wondering it there's a tutorial or a movie example that explians how to draw, circles or lines or boxes, just using actionscript.
If there's any would you mind let me know?
T.i.a
Giano
Draw Circle
Hy guys,
I'm still working on my paint-like program and its going pretty wel. Except when it comes to drawing cirkels. Flash came up with the most difficult way ever to draw a circle! What ever happened to just giving the coordinates of the bounding box of the oval? Or center point and radius for a perfect circle?
I've been working on this for three days now. With no result. I know there's a lot about it on the internet but I just can get it to work. Mostly because of the math.
I hate to ask but I've got no choice. Anyone up to creating this peace of code?
Here's what supposed to happen:
The user clicks on the button for drawing circles (I only need perfect circles so that should make it easier)
When he clicks on the stage, a circle should appear with the mouse position where the user clicked as center point and with the radius equal to the distance between the created center point and the current mouse position (I'm afraid this will need the Math.atan() and the Math.acos() functions). While the user drags, the circel should change size according to the mouse position. As the user releases the mousebutton, the current circle is drawn.
To give you a better idea, here's the code I used for drawing a squaire in the exact same way.
if (_global.action == 3) { // tells that user wants to draw a squaire
_root.xbegin = _root.xpos; //xpos & ypos contain the current mouse position. They are updated on every mousemove event
_root.ybegin = _root.ypos; //xbegin & ybegin are the coordinates where the user cliked (onMouseDown)
_root.draw = "rectangle";
onMouseMove = function () { //each time mouse moves, a new squaire is created
_root.createEmptyMovieClip(["clip"+i],i); //everytime user clicks : i++ to create overlapping MC's
_root["clip"+i].lineStyle(1,0xff0000,100);
GetPos.call(); //To get x & y position of the mouse --> then stored in xpos & ypos
_root["clip"+i].beginFill (0x0000ff)
_root["clip"+i].moveTo(_root.xbegin+11, _root.ybegin+10);
_root["clip"+i].lineTo(_root.xbegin+11, _root.ypos+10);
_root["clip"+i].lineTo(_root.xpos+11, _root.ypos+10);
_root["clip"+i].lineTo(_root.xpos+11, _root.ybegin+10);
_root["clip"+i].lineTo(_root.xbegin+11, _root.ybegin+10);
};
onMouseUp=function(){
if (_global.action == 3) {
loadVariablesNum("submitDisplay.cgi",0,"POST"); //send the data
onMouseMove=null; //stop drawing squaires
onMouseMove = function() {
GetPos.call(); //to restart mousetracking
};
}
}
|