Im probably overlooking something simple, but when I try to draw a rectangle Flash is automatically applying a corner radius. I've tried resetting the options in the Properties Inspector, which resets to the default, but soon as a draw a shape it goes right back to a random radius.
I have seen people complain about this, but no work arounds. The blurry eddges I see on the rounded portion of round rectangles is awful. IS there a workaround?
I am trying to draw Round Rectangle on Mouse Down. The width and height is depending on the new positions of mouse x and y. But it is not working as I wanted it to be.
My idea was to create a method for drawing rectangle with rounded corners, but while being able to specify which of the four corners (any, all, none,etc.) you wanted to round. The method below does the trick, but for some reason my corners don't match the same curves that I get using the same radius with drawRoundRect(). In other words, if I call my method (and set all four corners to be rounded) and compare that with the same call to drawRoundRect() the actual curves of the corners are slightly different.
HTML Code: public function drawComplexRoundedRect(startX:int,startY:int,rectWidth:int,rectHeight:int,radius:int,canvas:Sprite,roundTopLeft:Boolean=false,roundTopRight:Boolean=false,roundBottomLeft:Boolean=false,roundBottomRight:Boolean=false):void{ if(roundTopLeft){ canvas.graphics.moveTo(startX,(startY+radius)); [Code] .....
Then compare HTML Code: var canvas:Sprite = new Sprite; drawComplexRoundedRect(0,0,200,200,25,canvas,true,true,true,true); with HTML Code: var canvas:Sprite = new Sprite; canvas.drawRoundRect(0,0,200,200,25); and you will see the two rectangles are not identical.
var snapshot:ImageSnapshot = ImageSnapshot.captureImage(someSprite); var file:FileReference = new FileReference(); file.save(snapshot.data,'abc.png');
n the above code I am able to capture an image.But I also want to apply a scalingMatrix(for zoomIn/Out) and a clipping rectangle to it. How to do it? I tried capturebitmapdata too, but with that I can't even get a proper image. See here. So I don't want to use that.
I'm looking for a way to increase the click size so when I click, it would effectively count as a click on anything that is in a 100px by 100px radius around the click.
For those of you still with me, I am tasked with making some scrollable content in Flash. Load in a TextFile using LoadURL(), then display it. To get the text, we've written our own class TextFieldExtended, which is basically just there to give the textfile location to the constructor and then have the class do the various steps of getting it and loading it for you.So I needed to get a Scrollbar, which I got hereThe thing is, it works with Sprites.After trying to get it to accept TextFieldExtended, I bumped into a block, since the scrollbar relied heavily on a Sprite property that TextFieldExtended didn't have or could have.
So I tried adding the TextFieldExtended instance to a Sprite instance using addchild.A problem occurs here that I do not know how to handle. It seems that a Rectangle is drawn and the Text is drawn on that. I say this because the scrollbar moves the Rectangle up and down a bit, but the text doesn't scroll, just the Rectangle it is positioned in and the text then moves along with it.My question: can this be fixed, or is does this implementation of scrollbars need a lot of adaptations before this is possible?
I draw a rectangle i should see a little bold circle to indicate a perfect rectangle, I seemed to lost mine, can somebody please tell me how to get it back!
I am trying to convert a rectangle(actually multiple rectangles) to a curved rectangle. I think it should be pretty easy but I guess i am stupid. Basically I would have a start position and stop position (many of these), and they would be converted to curved rectangles and follow in a cicrle around.
I would like to create a rectangle inside of a rectangle, starting approximately 15% inward from the right side of the other rectangle.
I know how to create rectangles with:
Code: var newHotRect:MovieClip = new MovieClip(); newHotRect.graphics.beginFill(0x00FF00); newHotRect.graphics.drawRect(0, 0, 100, 100); addChild(newHotRect);
But how would I make another rectangle on top of that (the black one pictured) that is approximately 15% from the right?
I toyed around with .right, and .bottomright with no success. Can anyone lead me in the right direction? or even finding the x and y of the upper right or bottom right side of a rectangle?
how to respond when a rectangle hits another rectangle? I already know how to detect the collision, I just don't know how to respond to it. I'm just trying making a simple side-scrolling platform game where I have platforms I can walk on and bump against on all sides. I have searched everywhere and just can't find the tutorials I'm looking for.
I have a button that adds .01 to a total, but when it gets to around 6 it ends up being something like this .0600000000005 how can I fix this? This is what my code looks like so far.[code]
I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.
The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?
I've this problem with rounding up. My problem is more complex than i describe here but I'm sure i can figure out the rest myself once I got this working. I want flash to round up with two decimals at all time.
i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
var br:mc_bottomright = new mc_bottomright(); addChild(br); //proportional scale if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))
I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?
In actionscript 3, I have a user enter a number into a field and this field is supposed to be for a cash value. How do I make it so that if for some reason they put say 20.956, it would round up to 20.96?
I am wondering about making lines with a corner radius. It seems that the smaller the scale, the corners sort of distort, and end up looking jaggy. Maybe its just the way it is, but is there any remedy? I tried shifting the registration points, etc, but still the only way it looks smooth is when enlarged.
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.
Is there any way to "round trip" Android projects between Flash Catalyst and Flash Builder? I'm using the latest beta versions (Burrito and Panini). If not, will this be available with CS5.5 when it's released next month?
Using CSS, I can set the corner radius of the top corners of a tab in a tabnavigator: <mx:Style> .tabstyle { corner-radius: 10; } </mx:Style> <mx:TabNavigator tabStyleName="tabstyle" /> However, I also want the bottom corners to have a radius.
I am trying to make an application that tells me what points are within, say, 5 miles of me. I have my latitude and longitude coordinates that are constantly updating depending on my location... and I want to be able to search a XML file and ask whether or not certain locations are within the 5 miles.
If they are it displays those points in a list... if not, they are excluded.I don't need to be deathly accurate... Under a quarter of a mile or so would suffice.example of lat:long numbers would be something like
I'm trying to create a slider which will control the radius of a sprite I've created. This is the code I have so far: var aura:Slider = new Slider(); aura.liveDragging = false; aura.setSize(120,20); aura.maximum = 100; aura.minimum = 0; [Code] .....
This adds my slider, "aura", and the sprite, "circle", and sets the radius to the slider default value, 50. What I need to add to this in order for the sprite to change radius each time I move the slider.