ActionScript 3.0 :: DrawRoundRect Method - Any Way To Smooth Out Corner?

Jan 12, 2010

In drawing a rounded rectangle using the drawRoundRect method is there anyway to smooth out the corner. In my example the corners look like crap.
Code:
var rect:MovieClip = new MovieClip();
var color:Number = Number("0x"+listColor);
rect.graphics.beginFill(color);
rect.graphics.lineStyle(1, 0x000000);
rect.graphics.drawRoundRect(0,0,w,h,5);
rect.graphics.endFill();

View 2 Replies


Similar Posts:


Actionscript 3 :: DrawRoundRect Rendering Inconsistent Corner Radii?

Sep 14, 2011

I'm trying to draw a shape with quite precise rounded corners, I'd settle for anything around 3px. Unfortunately Flash has other ideas, and is creating a rounded rectangle with four seemingly different radii. My code is below:

var sq:Shape = new Shape();
sq.graphics.beginFill(0x000000,1);
sq.graphics.drawRoundRect(20,20,20,20,4,4);[code]....

The corners are noticeably different. If I were using a bigger radius it might not be so much of a problem, but because of the small radius of the corners the square just looks odd. Have I missed the drawRoundRectEvenly functio

View 1 Replies

ActionScript 3.0 :: Use Bitmap As Background With DrawRoundRect?

Jul 26, 2011

I'd like to use an image as the background on some dynamic movieclips..Here is my code :-
 
var sTab:MovieClip = new MovieClip();
sTab.graphics.beginFill(0x007FC7);sTab.graphics.lineStyle(1, 0xFFFFFF);sTab.graphics.drawRoundRect(0, 0, 81, 50,

[Code]....

View 3 Replies

Flash :: Set Alpha Value Of DrawRoundRect Object?

Feb 26, 2010

Ok I know this practically sounds elementary, but I don't understand what I'm not doing correct here. I draw a simple rounded Rect

[Code]...

View 2 Replies

Actionscript 3 :: DrawRoundRect - Get A Smaller Rectangle Than That Size

Aug 1, 2011

I'm trying to create a custom button with ActionScript 3.0. I'm suing a round rect as background, but I have a problem with it size. This is my custom button class:

[Code]...

I don't know why when I use a size of (40, 20) I get a smaller rectangle than that size.

View 3 Replies

ActionScript 2.0 :: Smooth Resize Onclick And Animation To Be Smooth?

Feb 9, 2004

I have a movieclip that I want to be resized when a button is clicked. I want the animation to be smooth as if it had weight though. I read the tutorial on this but I need something slightly different, I would rather it where I can just refer to a function that is set in another movieclip. That way I could easily refer to it again and just set the height, width, and if possible, x, and y.

And my second question, is how to keep the border of my movieclip that is going to be resized the same thickness. I want the inside to be resized but the sides to stay the same width but move to stay on the edge.

View 8 Replies

Professional :: Write A Draw Graphic That Is A Tweak Of DrawRoundRect?

Apr 16, 2010

I'd like to write a draw graphic that is a tweak of drawRoundRect. I can work with curveTo, the problem is I end up drawing all sorts of wierd shapes since I don't understand well the metrics. If I could look at the code for drawRoundRect, I could easily tweak it to my needs.

View 8 Replies

ActionScript 3.0 :: DrawRoundRect - Corners Of A Rectangle Are Not Very Consistent When The Curve/ellipse Values Are Very Low?

Jun 1, 2009

The corners of a rectangle drawn with drawRoundRect are not very consistent when the curve/ellipse values are very low (2-5px or so), most visibly when there's a border added.Even with hinting turned on, there's still a pretty ugly difference. When set to 3px (horizontal and vertical), the right-side corners look pretty close at around 3px, but the left-side corners are very off, and both look to be maybe 1px curved.

View 1 Replies

ActionScript 2.0 :: Flip Page Animation - Start Flip From "bottom-left" Corner Till "top-right" Corner

Aug 11, 2009

I am making something flash flip like: [URL] but i want to do it in my banner 1000 width and 299 height problem is that i have few banner images i think 5 to 8 and i want to start my flip from "bottom-left" corner till "top-right"

View 1 Replies

Lines With Corner Radius

Mar 10, 2012

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.

View 2 Replies

Keep Swf File In The Top Left Corner?

Dec 2, 2009

I want my flash document to stay flush with the left and top of the page, but i can't figure out how.

[URL]

I designed it so that the box with my name in it sits touching the left top corner.When I test it in flash thats what it looks like. But when I up load it it moves over there.

View 1 Replies

ActionScript 2.0 :: SWF Centered In Fullscreen With Corner Mc's?

Feb 16, 2010

Does anyone know the actionscript to keep the main SWF (which is 800x600) center of the screen in Fullscreen mode, while two other Mc's inside the SWF sit in the bottom left and right corners, like in this site...?

View 0 Replies

Make A Rounded Corner Box In Photoshop CS?

Nov 3, 2005

How do I make a rounded corner box in Photoshop CS? I don't want to "feather" it because that makes it blurry. I just want rounded corners.

View 9 Replies

ActionScript 2.0 :: Get The Bottom Right Corner Of A Textbox?

May 24, 2005

I need to be able to detect when the user has filled up an input textbox. Normally, if the user keeps typing the textbox will just scroll down a line and the user can keep typing.I need the user input to stop and perform some other functions once the user has reached the original hieght of the textbox.Setting a character limit is not an option as the font sizes will be changing.Here's a little screen grab of what I'm talking about

View 14 Replies

ActionScript 3.0 :: 1180: Call To A Possibly Undefined Method Error For DEFINED Method

Nov 19, 2010

I am getting this error: 1180: Call to a possibly undefined method startWorld.but the method startWorld is defined as you can see in attachment.

View 4 Replies

Actionscript 3.0 :: Make A Public Static Method Call Another Method, But Flash Throws Error 1180?

Feb 19, 2010

I'm tryng to make a public static method call another method, but Flash throws error 1180, sayng that the method called by the static method is undefined.

Code: Select allpackage
{
import flash.display.MovieClip;[code]....

View 2 Replies

ActionScript 2.0 :: Convert A Fortran Method To A Macromedia Flash Method

Dec 23, 2010

i have a fortran method which creates random numbers. i want to convert this method to a flash method . I want to get numbers from this method and use them in the delay method of flash.

the fortran method is the folowing

real znew1 , zold1 ,a,m,z1,p,TIME1
a= 16807.
m=2147483647
B=2

[Code]....

View 7 Replies

ActionScript 3.0 :: Overcasted Superclass Method Not Triggering Subclass Method?

Feb 1, 2011

I have a class called Animal that has a method foo() and I call it out within the Animal class.

Code:
protected function foo():void
{
trace("Animal");
}

I also have a class called Cat that extends Animal and overrides the method foo()

Code:
override protected function foo():void
{
trace("Cat");
}

However when calling the function foo() from the superclass it traces out Animal not Cat (using a Cat object).How can I make superclass call out methods in the subclass?

View 14 Replies

Force A SWF From Top Left Corner To The Correct Position?

Sep 27, 2009

how to force a SWF from Top left corner to the correct position.. When I tried to use a container it made the external swf not work at all, though it was in right position

WITH THIS CODE, THE SWF LOADED BUT JUST IN WRONG POSITION :
on (release) {gotoAndPlay(4);
loadMovie("gallery.swf",1);
}

then when I used a EmptyMovieClip it came in as the attachment.

Is there any other way to still use the LoadMovie() and adjust the x and y positions?

View 1 Replies

ActionScript 2.0 :: Creating Rounded Corner In Movieclip

Nov 10, 2009

I am creating one new empty movieclip like this,this.createEmptyMovieClip("vjn", this.getNextHighestDepth());
vjn.beginFill(0x000066);
vjn.moveTo(150, 50);
vjn.lineTo(50, 250);
vjn.lineTo(250, 250);
vjn.lineTo(150, 50);
vjn.endFill();

these lines are creating only the square corner, but i want rounded corner. How can i increase or decrease the radius size. How to create the rounded corner through script.

View 2 Replies

ActionScript 3.0 :: Keep The Same Rounded Corner Even When Want To Shrink It's Width?

May 8, 2010

How to keep the same rounded corner even when I want to shrink it's width?

View 2 Replies

ActionScript 1/2 :: Setting An Object To The Corner Of The Screen

May 4, 2009

I have a button control set up to switch my program from windowed mode to fullscreen, and back again.
 
This is just 2 buttons that alternate frames in a movieclip.
 
I was wondering if there was a way to keep the movieclip locked to the upper right corner of the program when the user switches between windowed and fullscreen modes.
 
The code for the buttons; if needed, is:
 
//Fullscreen button
on (press) { fscommand("FullScreen","True"); }on (release) { gotoAndStop(2); }
//Window button
on (press) { fscommand("FullScreen","False"); }on (release) { gotoAndStop(1); }

View 1 Replies

ActionScript 3.0 :: Getting The Top Left Corner Of A Grid Cell?

Jun 23, 2010

I'm making a map editor for a tile based game. The editor makes a grid:

private function draw
var tileSize:uint= 50;  for(var i:int=0;i<row;i++)  grid.graphics.lineStyle(1,0x000000,0.3); 

[code].....

View 3 Replies

ActionScript 1/2 :: Ship Just Sits In The Top Left Corner Doing Nothing?

Apr 27, 2011

I am following this tutorial and i have got to step 9.http:[url]......I have made a file called Ship.as with this code in.

class Ship extends MovieClip[code]....

When i test the SWF nothing happens. The ship just sits in the top left corner doing nothing.

View 3 Replies

Actionscript :: Draw A Line From One Corner Of Stage To Other?

Apr 14, 2010

I want is to draw a line from one corner to the other.[code]...

View 2 Replies

Flex :: Extend A Panel To Allow CornerRadius Per Corner?

Apr 27, 2010

It looks like the "cornerRadius" property of a Panel only changes the top corners and bottom if using a ControlBar. I'd like to specify a corner radius for each of the corners individual.

I know Degrafa can do this but I'd like to avoid if possible.

View 1 Replies

Css :: Corner Radius Applied Only To Specific Corners?

Oct 5, 2010

I've this tabs that I wanted to make rounded only on top-right and top-left corners. But it ended up rounding all 4 corners.

What I did:

<mx:TabNavigator id="myTabNav" x="58" y="61" width="584" height="200" creationComplete="setColors(event)" styleName="myTabStyle">
<pages:One label="ThisOne" id="one" name="One"/>

[Code].....

As you can see I have the "focusRoundedCorners" to point to top-right and top-left but no luck. What I got is:

View 2 Replies

Actionscript 3 :: Draw Boxes At Each Corner Of MovieClip?

Oct 15, 2010

I am trying to draw 4 boxes at each corner of the MovieClips but can not figure out how to detect the top right corner, bottom left and bottom right corner.[code]....

View 2 Replies

As3 :: Flash - Draw A Only Bottom Rounded Corner?

Feb 16, 2011

how can i draw a shape, that is only rounded at it's bottom ?

var _myShape:Shape = new Shape();
_myShape.graphics.lineStyle(4,0x000000,1,true,....);
_myShape.graphics.drawRoundRect(0,0,50,50,10);

View 3 Replies

Flex :: Open Window On Right Bottom Corner?

Mar 1, 2011

I am developing a flex air application and i want to it open in right bottom corner as notification..How do i do this.

View 1 Replies







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