Actionscript 3 :: Draw Concentric Circles In Flex?
Apr 19, 2011I 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.
View 1 RepliesI 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.
View 1 RepliesI am drawing 12 concentric circles, and on each circle I plot dots. When I click on a dot, I need to display a text(I will be displaying usernames).
I have the circles and dots in place. But a funny thing is the mouse events work for few dots and does not for few. I am totally stuck now. Please help. Pasting my code. On running, dots on the left side of the circles show the hand pointer whereas the ones on the right donot work!
[Code]...
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.
View 0 Repliesi am currently trying to use actionscript to make a flash program so that when i click once to set a circle and click another place to set another circle, a line will join these two circles. If i click to set a 3rd circle then this 3rd circle will line to the 2nd one and so on.... i have a circle movie clip in my library and the circles are appearing fine. my code is as follows but no line is appearing between the circles.
[Code]...
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..
View 1 Repliesanyone 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.
View 1 RepliesI 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.
I'm trying to get rotating and growing badges inside of one another. I've got a movieclip ("badgeanimation") that rotates and grows. I want to have several of them spinning and growing inside of one another, and have it go on forever. My script below places one clip but then just replaces it. How can I get some of them going at the same time, inside of one another?
[Code]...
We are building an application in Flex where we have to scale and reposition the circles based on the changed screen resolutions. Example: Current resolution: (800, 600) I draw a circle at position (410,290) with radius 10 Now If i change the resolution of screen to (1440, 960) then the circle should be drawn at the same place on the screen with respect to the new resolution with relative increase in the radius.
View 1 RepliesI need to customize a look and feel of standard Flex LineChart with LineSeries. I cannot figure out how to change default circles drawn when the mouse pointer is over a data point.
View 3 Repliesi have a class thats create a class with bitmapData that merge 2 IBitmapDrawable. one of them is 24*20 while the other is 16*16.i want to draw the smaller first in a bitmapData object which its width and height are 24*20 but i want to draw it in the center of the big bounds.
[Code]...
I'm trying to get a series of concentric rings to appear on the stage, grow, and then fade. So far I have everything working just fine except the setInterval integration. If I run my function (placeRing) it drops a circle on the stage, which then swells until it fades away at the appropriate point. When I rely on setInterval to run the function for me, however, things no longer work. A trace statement in my function is displayed as expected once a second, but the movie clip isn't placed on the stage. I'm sure I'm missing something simple, but I haven't been able to figure it out.
[Code]...
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].............
I am using the draw() method of the BitmapData to encode a jpeg of part of the image. Now this should be easy enough given the object I want to draw to the bitmap is on the stage at design time so I know its location and dimetions exactly! Heres the code I have in place.
Code:
var myBitmapSource:BitmapData = new BitmapData ( street.width, street.height, false, 0x333333);
myBitmapSource.draw(street, null, null, null, new Rectangle( 96, 5, 571, 450 ), true );
I know for a FACT that no part of the street clip I am drawing out is in negative space, and it's registration is (0,0). However, it cuts off A lot of the top of my image. y=5 in the above rectangle is where I need the top to be, but it cuts the top off of the image... even if I change it to 0, it has no effect.
I'm making something that requires me to draw() the youtubeplayer Giving me this pretty error:
[Code]...
I'm trying to do some lean blitting for an object that rotates by rotating it once at startup and capturing a BitmapData snapshot of each 5 degrees. The problem I'm having is that the draw() method of the BitmapData object is only picking up pixels in the MovieClip that are below and to the right of the registration point. If I change the MC so that the registration point is in the top left corner, I sometimes get what looks like most of the pixels, but the entire object rotates into and out of the frame, since it's rotating around the corner and not the center.
View 5 RepliesI have a line series in a linechart and a slider that goes from 0 to 200. When I now move the slider, I want to have a dot appearing at the chart so when I move the slider to 150, there should be a dot where the x-coordinate of the chart is 150.
View 2 RepliesI am trying to create a "radar-like" control within our Flex application. See the following link for an example (sorry, small image...) [URL] This is my first foray into drawing with Flex. I would like to draw the main circles of the radar, the radar scanning shape, and circles/balls representing objects within the radar. These objects need to have the ability to be clicked on or hovered over so the user can get more information. I'm looking at Sprite's and Shapes, etc. but confused as which to use to create such a control.
View 3 RepliesI'm trying to create dynamic flower component to depict relations between parent object and it's children.Parent object is represented by daisy center and the children are represented by petals. Each of above can have a specific fill/color and text label, moreover petals should be draggable. My question is: is that possible to do using Degrafa? Can anyone post an example of drawing flower using degrafa?
View 1 RepliesI'm wondering (based on scoping rules) how I might do the following: I want to draw to a sprite that exists on the main stage in which I have a class instantiated.
So something like
public function MyClass(reference:String){
this.reference = reference;
}
[Code]...
Would I use super() in this case, or what's the usual methodology?
Do you have any recommendation for a free 3D charting library in Flex. To be more precise, I only need to draw surface (for now). Basically, I just need a chart that displays three axes (one should be timeline, and two should be linear axises) and the surface.
From what I have seen so far, two most popular free Flesh 3D libraries are Papervision3D and Away3D. Also, I've found one IBM library - ILOG Elixir that looks really nice, but it's proprietary (although, I haven't seen any surface examples for Elixir neither). From what I have seen, Papervision3D and Away3D should do much more then 3D charting, but I haven't seen any examples on how to draw surfaces in any of them (except this line chart in 3D: [URL]
I'm trying to draw a box with actionscript 3 and flex 3.5. First a few things:
1) I am not using any IDE at all, just notepad and flex
2) I am not using any mxml file at all (yes this is possible with as3 apparently)
3) I am not using inheritance ie I'm not using an extends on my classes, I'm trying to get this particular bit of code to work only through composition
Anyway this is the code itself (the file name is MAIN.as):
[Code]...
I'm trying to draw lines on a canvas object. When the width of the Canvas is less that the width of the line, it draws outside the Canvas over other elements. I read about this problem and I try to resolve using a inner Canvas with a longer height so a scrollbar appears.But I also read that this problem can be correct using a mask but I do not know what is the better way. Which do you recommend?
<mx:Canvas id="panelContentECG" width="100%" height="400" backgroundAlpha="0.5" styleName="miCanvas" borderStyle="solid" cornerRadius="20" borderColor="0xFCFE00" horizontalScrollPolicy="off">
[code].....
I'm trying to draw a String inside a canvas. The text and the position of the String changes pressing differents bottoms. For doing so, I create TextFields which I added to a sprite which I added to a Canvas:
canvas.rawChildren.addChild(spriteNombres);
The first time everything works fine but when I press the bottoms,it does not refresh and appear the old textfields and the new ones.I cant remove the old ones, I try with removeAllChildren and also trying to delete one by one with removeChildrenAt. I do not know if I'm doing something wrong or maybe this is not the best way.
I also try creating bitmapdata and drawing in the sprite inside a rectangle.
var channelName: TextField = new TextField();
channelName.text = channelNames[displaySequence[channel]];
if (channelName.text != null) {
[Code].....
the problem may be a simple one but I can't figure it out. I have an image loaded into BitmapData. now I want to take text from a textinput and put it on the BitmapData. Basically it's drawing a text on the BitmapData and get the result as another BitmapData that will consist of the original BitmapData with the text drawn over it on a specified position
View 2 RepliesI am creating an application that requires a user to draw their hand signature on a tablet. Does anyone the best way to do this on Flex mobile 4.5? What do I draw on to, a Sprite, canvas?
Also, I would need to save the signature as a .jpg, could this be done?
[code]...
Basically this is not working. I used this question to improve - still nothing.Why doesn't this Flex App draw a simple rectangle?
How can I used ActionScript to draw on different frames of a movie clip. That is, make it so that
movieClip.gotoAndStop(0);
Will show something different to
movieClip.gotoAndStop(1);
Dose the Flex has some Tags just like <v:line> or <v:polyline> in VML?
View 1 RepliesI'm building a flickr application in flex at the moment but i keep getting sandbox errors when i invoke BitmapData.draw();.After doing some google research i found that the proper policyfile needs to be loaded.i do this using: Code:Now this still doesn't resolve the issues. Upon further research i found that i need to check the policy file first using checkPolicyFile = true;
View 2 Replies