ActionScript 3.0 :: Scale9grid A Button To Preserve Its Rounded Corners When Resizing?

Aug 24, 2009

I am trying to scale9grid a button to preserve its rounded corners when resizing but I have run into trouble.The button is an ordinary Button symbol and it has 4 layered states (Up, Down, Over, Hit).In each layer there are some shapes (the outer button border, two background shapes inside the button for shading and then some extra outer border shapes to create the pressed down effect). The button contains no other elements,not even a textfield (the textfield is on the same level as the button).

The button is inside a movieclip (which also carries the textfield) that is of the same size as the button and is resized as by Adobe design when the button is resized (i.e. I am never manipulating its size).The Button is 35 high and the textfield is 25 high. They have their registration points both centered and placed at the the same coordinate.I use the follow code to resize and scale9grid the button:

popup.btnLoginButton.width = popup.btnLoginText.width + 20;
popup.btnLoginButton.scale9Grid = new Rectangle(10, 5, popup.btnLoginText.width, 15);

The above scale9Grid throws a Error #2004: One of the parameters is invalid.The same error occurs unless the Rectangle parameters are very small - for example Rectangle(5, 5, 5, 5) even though the textfield is much longer. But when the Rectangle is that small of course no scale9grid scaling is taking place.

View 2 Replies


Similar Posts:


Draw A Triangle With Rounded Corners?

Nov 23, 2002

It's easy to draw a round cornered rectangle/square but how do you draw a triangle with rounded corners?

View 4 Replies

Flex :: Rect Rounded Corners Be Different?

Jun 21, 2010

When I use <s:Rect> to create a rectangle, I use radiusX to get rounded corners. Problem is all are the same roundedness. Is there something similar to Rect that lets me control the radius for each corner separately? If not, what's the best way to create this from scratch? graphics library or what?

View 3 Replies

IDE :: Can't Get Rounded Corners On My Rectangle Tool To Go Away

Feb 7, 2004

I'm trying to get plain straight corners on a rectangel. I have been drawing a rectangle or even before drawing one, selecting the little tool in the lower left and I put in a value of 0, but as soon as I draw anything it rounds up again. How do I get rid of this problem??

View 2 Replies

ActionScript 2.0 :: How To Draw Box With Rounded Corners

Jul 16, 2004

I need to draw a box with rounded corners. I can't get a hang of it. I want to draw it from the following variables:
boxwidth = 200;
boxheight = 200;
radius = 5;
How do I draw this? You should see the artwork I have (by mistake) created while trying to get it right.

View 7 Replies

Flex :: Adobe Catalyst: Rounded Corners?

Dec 26, 2009

I've created a rectangle in catalyst and under the "properties" panel, all I can see is Corners 10 for the rectangle. Is there a way to individually define each corner similar to CSS. I can't see any source code view in catalyst to enable me to fine tune it for each of the 4 corners. How do I specify the roundedness of each corner separately?

View 1 Replies

Actionscript 3 :: All Rounded Corners TitleWindow In Flex?

Jun 30, 2010

how can i get a title window with all rounded corners, so that i may make it whole round or circular shape ?

View 2 Replies

Flex :: Rounded Bottom Corners On Window?

Sep 30, 2010

I'm making a flex 3.5a/air2 application and I've made a popup window but I can't seem to get its bottom corners rounded. Setting cornerRadius seems to only affect the top corners. There doesn't seem to be a roundedBottomCorners property like there is for panels, and adding a controlbar with a cornerRadius also has no effect.

View 2 Replies

Flash :: Css3 - Rounded Corners Not Displaying Over Top

Nov 16, 2011

I have a bookmarklet that has rounded corners. When using the bookmarklet over the top of a flash website and even a pdf document (I think) etc. Rounded corners appear as transparent squares.

View 1 Replies

Actionscript 3.0 :: Draw Triangle With Rounded Corners?

Dec 19, 2008

Is there a simple way to draw a triangle with rounded corners in AS3?

View 1 Replies

Actionscript 3.0 :: Draw A Triangle With Rounded Corners?

Oct 7, 2009

Draw a Triangle with rounded corners?

View 2 Replies

ActionScript 3.0 :: Draw Rectangle With Only 2 Rounded Corners?

May 23, 2009

is it possible to draw a rectangle specifying which corners should be rounded and which not in a simple manner?

View 3 Replies

ActionScript 2.0 :: Flash Satay .swf Rounded Corners?

Jun 12, 2010

I was wondering how to use the container .swf required by Flash Satay to also display rounded corners of a fixed size.

View 1 Replies

ActionScript 3.0 :: Drawing Irruglar Shape With Rounded Corners?

Jan 7, 2010

i have been tasked to create a rollover state that has dynamic irregular shapes that surround the movieclip target. The target is always a rectangle and the shapes will look roughly like:I think i will have to draw this old school without using the easy predfined shape classes. I first thought about doing two rounded rectangles to fake it, but the line cross over (pointing green arrow) will overlap. Anyone have ideas on how to approach this? If i go with the drawing api, is there a formula to working out the rounded curveTo angles on the corners to always be the same radius?

View 2 Replies

Actionscript 3 :: Create HBox With Only The Top Corners Rounded In Flex?

Oct 27, 2009

I'm trying to create an HBox in flex that has only the top corners rounded. HBox (and all the other flex containers) have a cornerRadius style, but it applies to all corners. I'm not seeing a way to specify the style of individual corners.

Is there any built-in way to do this, or will I need to write my own custom drawing code to draw the background with rounded corners?

View 2 Replies

Flex :: Make The Rounded Corners Of The Client App In WindowedApplication?

Apr 2, 2010

In my application,showFlexChrome is set as true in WindowedApplication,and the *-app.xml is setted as follows

<systemChrome>none</systemChrome>
<transparent>true</transparent>
<visible>true</visible>

I know how to make the top border rounded corners with follow codes:

borderStyle="solid" cornerRadius="8"

But I cannot find a method to make the bottom border of my app window rounded-corner.

View 1 Replies

Css :: Properly Set Corner-radius Of A MX List And Get Rounded Corners?

Apr 8, 2011

I have a mx.components.List component with a bunch of custom styles:

<mx:Style>
.dropDownListStyle
{

[code]....

I'm creating the list in AS:

_dropDown = new List();
...
_dropDown.styleName = "dropDownListStyle";

The List is then added as a popup with PopUpManager:

PopUpManager.addPopUp( _dropDown, this );

The problem is that the corners of the newly created popup are not rounded. I found that border-style is needed in order to get the effect, but adding this property didn't help. I'm building the project with Flex 4.1, but the List and its parent are MX components and it's a lot of work to migrate them to Spark.

View 2 Replies

Flex :: Can't Show Rounded Corners On Custom Panel Skin?

Aug 12, 2011

I wanted to change the background color of my Panel title area and I discovered that I needed to create custom skin or skin extender to accomplish this. So I created a skin called myPanelSkin based upon the Spark.PanelSkin. My background color works fine but it will no longer show the cornerRadius defined either on the component or in a styleI then tried another approach and simply created a new skin as an exact copy of the Spark.PanelSkin. It also looses the cornerRadius.

View 2 Replies

Actionscript 3 :: Create Flex Image With Transparent Border And Rounded Corners?

Mar 21, 2012

I have a photo in a Flex project[code]...

But now I'm wondering if I can make this image as the image below, in Flex (4 / 4.5 / 4.6) (in MXML and/or ActionScript 3)

View 1 Replies

IDE :: Way To Preserve A Stroke Whilst Resizing

Feb 24, 2009

I would like to know if there is a way of maintain the stroke size whilst resizing my object with actionscript.I have an object that imported from Illustrator with a 7pt stroke and would like that stroke to maintain its aspect even when resized to 10%

View 1 Replies

Flash :: Preserve Transparency When Resizing Picture?

Jul 25, 2011

I use a flash program in my website to resize pictures before transfert, for preserve my bandwidth.

But, when i try to transfer a .png file with transparency, the resize don't maintain transparency in the .png file result. It's a problem for use it after.

[Code]...

View 1 Replies

Round Specific Corners Of A Button In Flex?

Jul 6, 2010

I want to round specific corners of buttons to create something like mx.controls.ButtonBar. But I cannot figure out how ButtonBar does this even after looking at its source. I thought the focusRoundedCorners css property was the answer but that applies only to drawing the button's focus box.

View 1 Replies

ActionScript 3.0 :: Use The Scale9Grid On A Sprite?

Apr 15, 2009

I am trying to use the scale9Grid on a Sprite but it keeps throwing an error.

Code:

private function drawNameFile() : void
{
var nameField : Sprite = new Sprite();
var background : Shape = new Shape();

[Code].....

View 2 Replies

IDE :: Doesn't Scale9Grid Work With Bitmap

Aug 1, 2007

I have uploaded a test here

Code:
a2.width = 300;
a2.height = 300;
b2.width = 300;
b2.height = 300;

Both clips in library have scale9grid enabled, but it just wont apply to the imported bitmap, just vector.

If there is no way around it, I cant imagine it is too hard to write a custom class that applies scale9grid to the bitmap aswell, maybe someone know if it has been made already?

trace(a1.scale9Grid); and chop the bitmapdata manually?

View 6 Replies

ActionScript 3.0 :: Scale9grid On Mask Object?

Oct 14, 2007

i can't make this work for some reason

[Code].....

..if I don't apply mask, scaling works great, but when I do scaling is wrong...

View 4 Replies

ActionScript 3.0 :: Scale9grid Error For Left Scale

Nov 30, 2009

I have an MC with the registration point set to the Top Right so it will scale down and left:

[Code]...

View 1 Replies

Flash :: Preserve Illustrator Glow In It?

Apr 2, 2012

When I pull Illustrator elements with Outer Glow into Flash, the glow looks pretty nasty...lots of artifacts and "squares" throughout the area where the glow is.

Is there a way to preserve the high quality glow I see in Illustrator once I import those graphics into Flash?

View 4 Replies

AS3 :: Preserve Tabs When Saving XML In FLex4/Air App?

Mar 31, 2011

I'm loading an xml file in AS3/Flex for an AIR app. When I save it, the indenting looks pretty, however all the tabs from the original file, are now spaces. Can I save to that the tabs remain?

open file code:

var file:File = event.target as File;
var fileStream:FileStream = new FileStream();
fileStream.open( file, FileMode.READ );

[code]....

View 1 Replies

ActionScript 3.0 :: Preserve Array Of Objects?

Aug 2, 2011

I need to store an array of objects that will serve as a back-up of some master data. I then will need to copy that array and manipulate the object data within. The problem is: when i change any of the object data in the new array, it is changing the orginal object data in the "back-up" array - the array that should not be changed in anyway.[code]...

View 9 Replies

ActionScript 2.0 :: CS3 Load Php Into Flash AND Preserve Text Formatting

Feb 26, 2009

Using AS 2.0, I'm trying to load some php into a dynamic text box in Flash via loadVars, and once I bring it it, it strips the formatting on the next. Such as link colors, bold, italics... just simple html formatting. How can I preserve that. The formatting of the text is done on an admin website.

[Code]...

View 2 Replies







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