Actionscript 3 :: Trigonometry - Radius Out To The Outer Concentric Circle And Calculate The Position Of That Outer Point?

May 29, 2011

I've got two concentric circles with their centers at (centerX,centerY). The inner circle has a radius of 100 and the outer circle has a radius of 400. If take a point on the circumference of the inner circle, I can draw a line from the center to that point. Let's call that point x1,y1). I now want to continue that radius out to the outer concentric circle and calculate the position of that outer point (x2,y2).

I'm adding a 3px 'dot' just to show where x1, y1 is on the screen. (Subquestion: I can't see it...not sure why.)This is what I'm trying:

var x1:Number = 100;
var y1:Number = 50;
var x2:Number;[code].............

View 1 Replies


Similar Posts:


Flex :: Find Point In Area Of Outer Circle?

Dec 23, 2010

I have two circles, an inner circle and an outter circle. I'm trying to find points that reside within the area between the edge of the inner circle and the edge of the outer circle.

View 1 Replies

ActionScript 1/2 :: Object And Sent To An Outer PHP File?

Feb 21, 2009

I am creating a Flash (AS1) form that collects user input in Russian. Once the data is collected, it is stored in a LoadVars object and sent to an outer PHP file as follows:

[Code]...

View 2 Replies

ActionScript 2.0 :: Put An Outer Glow Around Words?

Sep 16, 2004

Is there any way that you can put an outer glow around words in flash??

View 4 Replies

ActionScript 2.0 :: Importing Of Outer Class - Errors

Jun 11, 2009

I have a problem with importing of outer class. Here is the scenario: This picture shows the directories structure: I have a *.fla file located in "main/" directory and I'm trying to import outer class XModel located in "main/org/XLEFF". Here is the code:

[Code]...

View 8 Replies

Actionscript 3 :: Scroll Bar In Datagrid But In Outer Container

Apr 27, 2011

I have a datagrid with more than 70 columns (with few fixed). I dont want the scrollbar to appear in datagrid (both horizontal and vertical) but in the parent container which is a VBox (or canvas) instead. This will help to scroll the screen vertically without having to scroll all the way right in datagird to scroll vertically.

View 2 Replies

ActionScript 2.0 :: Put An Outer Glow Around Words In Flash?

Sep 16, 2004

Is there any way that you can put an outer glow around words in flash??

View 4 Replies

Flash :: Installing Through An Iframe Getting Redirected Back To The Outer Frame?

Dec 11, 2009

I'm using adobe's example.swf to provide inline flash upgrades for users. However, if the example.swf is embedded in an iframe, and the user gets redirected, adobe will redirect them back to the inner iframe page, causing breakage.

Is there any way for this redirect to bring the user back to the outer frame?

View 1 Replies

ActionScript 1/2 :: Calculate By Math The X Position Of Point 1?

Oct 28, 2010

I´d like to know if there´s a way to calculate by math the x position of point 1. There´s some coordinates at the image here attached. The "mc" movie clip is the main triangle.

View 5 Replies

ActionScript 2.0 :: Elastic Mouse Follower - Can't Get The Outer Part Of The "tv Screen" To Work

Apr 18, 2009

i'm trying to get something like: [URL] i have this so far: PHP Code:

[Code]....

that scales the inside clip properly but i cant get the outer part of the "tv screen" to work

View 1 Replies

Flash :: Debug An Inner Swf That's Loaded From A Non-debug Outer Swf?

Apr 4, 2009

I have a swf that I need to attach the flex builder debugger to. I have full access to the source code, and can make a debug build of this swf.

However, this swf is being loaded by a non-debug build of another swf which I don't have source code to, and can't make a debug build with.

I've tried mocking this up with two very simple swfs, and while it works fine when both are debug builds, when the outer swf is a non-debug build, while I can get the debugger to connect, I don't get trace messages, breakpoints don't work, and it seems to lock up the flash app.

View 2 Replies

ActionScript 2.0 :: Calculate The Direction And Speed A Circle Has After Colliding With A Static (non-moving) Circle?

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

ActionScript 2.0 :: Calculate Direction And Speed Circle Has After Colliding With A Static Circle?

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

IDE :: Tween A Radius To Outside Of Circle?

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

ActionScript 3.0 :: Slice A Circle Into Same Radius Wedges?

Jun 11, 2009

How to slice a circle into same radius wedges, like so[url]...

View 2 Replies

ActionScript 3.0 :: Draw A Line That Is A Radius Of A Circle?

Apr 23, 2010

I want to draw a circle on the scrren of a random x,y position and a random radius. Then, I would like to draw a line that starts at the center of the circle and ends at the spot where the circle ends, at its perimeter. All I have been capable of doing by myself was creating that circle and set the drawing position with the moveTo function to its center, but I don't know how to calculate the length of the radius, so I have the coordinates for the lineTo function.

View 7 Replies

ActionScript 1/2 :: Increase The Radius Of The Circle By Applying Tween Class?

Aug 18, 2009

I am created a circle using the following script,

[CODE]...

Now what i want to know is that can I increase the radius of the circle by applying tween class?

View 5 Replies

ActionScript 3.0 :: Predefined Property To Increase/decrease The Size/radius Of A Circle?

Jun 29, 2009

I am new to Flash & ActionScript 3.0 platform.My issue is: I am loading an image onto the stage dynamically using Loader & URLRequest classes. Whenever I click on existing circle[which gets created when I click on the loaded image, which is of Sprite type], the size of the circle should be increased to some extent(let us assume, basically circle(Sprite)is created with radius=3 when we click on the image, but, when we click on the created circle, it's radius must be increased to 5). It is the requirement.
 
So, for this to implement, Do we have any property or method to change the Sprite object's size directly?

[Code]...

View 4 Replies

ActionScript 3.0 :: Allow The User To Create A Circle With A Specific Radius And Colour In A Certain Frame?

Jul 28, 2009

I need to allow the user to create a circle with a specific radius and colour in a certain frame (lets say frame 2), and then add that circle as a symbol to a different frame (say frame 1). First off, im simply creating a circle.. This is what ive got in frame 2 so far:

(in Frame 2 of the timeline)

Code:
stop();
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;

[code]....

Ive got this much working, but I dont understand how to convert the output of this function to a symbol usable in another frame..

View 3 Replies

Actionscript 3 :: Change Shape Of Circle By Dragging Point On Circle

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

Actionscript 3 :: Find Point With Radius And Angle

May 22, 2010

I'm not a genius in geometry, I'd like to find a point in as3 with the radius and a angle but I don't remember the rule, I know this should be simple!

View 3 Replies

ActionScript 3.0 :: Generate A Random Point Moving Clockwise Within A Radius?

Jan 16, 2012

I wish to have a function that will take as input a radius value and a magnitude value.

It will return firstly a point (x,y) and also secondly a direction, (vx,vy) which will have a certain magnitude(speed).

The point returned will be a random point within the radius value and the direction will be a a (vx,xy) that moves the point perpendicular to the line segment (x,y) ->(centrepoint).

View 9 Replies

ActionScript 2.0 :: Move A Point (or Circle) Slowly And The Point Let Behind A Line?

May 3, 2006

How can I move a point (or circle) slowly and the point let behind a line.When the point turn back the line will be erase.

View 8 Replies

ActionScript 2.0 :: Calculate The Circle Radians?

Feb 20, 2010

i have one problem. i create one circle and i placed more than one points outer of circle (the points are created dynamic).

View 1 Replies

Calculate Centre Point Of Rectangle In Flex?

Feb 23, 2012

I have two rectangles: var rect1:Rectangle = new Rectangle(66,147,89,67);

var rect2:Rectangle = new Rectangle(155,147,89,67);

How to calculate the centre point of these rectangles based on their x and y positions. I want the centre point to be calculated with relative to stage

View 2 Replies

ActionScript 3.0 :: Calculate Mouse's Distance To A Certain Point?

Dec 4, 2009

What I am trying to do with AS3 in Flash cs4 is calculate the cursor's distance to given point (let say 400,300) and use that distance to constantly (20 fps) change my curtain's alpha value. (which is basically a box turned into a movie clip) [code]...

View 5 Replies

ActionScript 3.0 :: Calculate Position According To Rotation?

Jun 16, 2011

I have child (1) and I am rotating it by some custom num of degrees. After rotation (2) I want to 'align' this child to left_center side of the parent (should look like 3). Without roration I would set x to 0, but after rotation position of registation point changes.

way to calculate new x/y position based on rotation.

View 6 Replies

ActionScript 2.0 :: Calculate The Exact Position And Scale?

May 15, 2006

imagen I have a movieclip (space_mc) w1000Xh1000 px?

inside the space_mc I have 2 movieclips:
- vlak1_mc (w100xh100px, _x:100,_y:100);
- vlak2_mc (w100xh100px, _x:400,_y:400);
ok!?

now i put the space_mc on the stage and scale it to 20% the stage (document properties) are w800xh600

Now i want that the USER clicks on vlak1,2_mc and the space_mc scales to 100% But the clicked vlak(1,2)_mc must have the exact coordinates as in the space_mc?

so if clicked on the vlak1_mc!

the space_mc zooms in to 100% and the _x,_y of the vlak1_mc are x100,y100 on the stage(800x600)?

[URL]

View 1 Replies

Flash :: Moving A Circle Around A Point?

Aug 20, 2011

I have a circle (bounding circle) offset from the centre point of my entity and I'm looking on how to move that circle around the entity as it rotates so that it's always in the same spot of the character.For example,say I have a bounding circle for the front of a car, when the car turns, that bounding circle needs to turn to So I have two points: position which is the position of the entity's centre point and offset which is the offset of the circle from that position. This assumes an angle of 0.

So if my car is facing 0 degrees: position (150, 150) and offset (50, 0) then the bounding circle would be at 200, 150.Now if I rotated the car 90 degrees, the bounding circle should be at position 150, 200.This is what I have now:

var differenceX : Number = _centre.x - _offset.x;
var differenceY : Number = _centre.y - _offset.y;
var rotatedX : Number = differenceX * Math.cos(_angle);[code]........But it's giving me these long ovals and now a perfect circle.

View 3 Replies

ActionScript 2.0 :: Move Point Around Circle?

Feb 4, 2009

how can me move point arrount circle

just i want the point that you press on it and move it arrount the circle

View 0 Replies







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