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


Similar Posts:


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

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

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

Professional :: Inconsistent Playback On Various Computers?

Apr 6, 2012

I created a Flash .exe that plays a couple FLV files, but in testing the files we've noticed some inconsistent playback on various computers and here's what we've found: On an Intel Zeon 3ghz quadcore 32bit Windows 7 machine, the playback is smooth and acceptable, using an average of 50% of all four cores during playback.

On a single core Windows XP PC, there is some playback hesitation using 100% of the single core during playback. On an Intel P4 3ghz with HT (dual core) 32bit Windows 7 machine, the playback is initially very choppy with continueing choppiness throughout to a somewhat lesser degree, using almost 100% of both cores continuously during playback.

We want to point this out because on PCs that are less than multi-core Intel Zeons, we would reasonably expect that the playback experience for the end user will be unsatisfactory. Is there anything that can be done about this to avoid this being a problem after the fact, as this client will be having many of these USBs manufactured.

View 1 Replies

ActionScript 3.0 :: Inconsistent Behavior With <b> And <i> In TextField?

May 19, 2011

I've created a text field, styled it with CSS imported through an XML fragment, etc., and almost everything works as it should.

The exception (of course!) is with <b> and <i> tags. I've included the relevant font outlines in my SWF, and the bold or italicized text does in fact show up, but here's the thing: sometimes, the space between a word and the opening <b> or <i> tag disappears!

My text is all read in through XML <![CDATA[]]> blocks. If I had the following fragment:

Code:
<![CDATA[This is <b>bold</b> text. And this is <i>italic</i>.]]>

The output might looks like this:

This isbold text. And this isitalic.Or it might looks like this:

This is bold text. And this is italic.

The problem is that the behavior changes according to the alignment of planets and phases of the moon or something I don't know. I tried forcing an extra space between opening tags, which would correct it in the instances where the space is deleted, but it adds an extra space where it's not!

View 2 Replies

ActionScript 2.0 :: Game Scoring Is Inconsistent

Jan 8, 2012

I'm building a simple game where players scores 1 point each time his/her paddle makes contact with a ball falling vertically from a random X position. All works well - except for the scoring. Hits will score anywhere from 1 to 4 points; they should only be scoring 1.

View 2 Replies

ActionScript 2.0 :: [CS3] Mailto Button Inconsistent On Different URLs

Feb 3, 2009

I am stumped on a problem that I've been searching the forums for, but can't seem to find an answer to. I was hoping a Flash genius here might have an idea. I'm working on a site in which I'm having issues with a mailto button. Here's the deal. The site shows up in "two" places (although they both pull from the same .swf files) [URL] and [URL] The site is built using Actionscript 2.0 and publishes for Flash Player 6. I'm using both CS3 and CS4 (depending on what computer I'm working on) but always publish for CS3.

On the www location, the mailto button works properly and opens up an email. On the http:// location the button does NOT work, and will not open an email. These buttons can be found in the "who" section - when the user clicks on a profile it opens a new window with a headshot - which are the "buttons" in question. I've done tests on the server, nesting buttons inside multiple movie clips to re-create the scenario. And they work. And I've also changed the button to a movie clip using:

[Code]....

View 2 Replies

ActionScript 3.0 :: 3D Rotation Inconsistent Between Motion Editor &amp?

Nov 21, 2008

I'm trying to access the rotationY property in code to determine the current state of a movie clip that has its rotationY animated in the motion editor. What I'm seeing is that the value of the property reported in a trace stmt is different than the value shown in the motion editor.

In the motion editor I created a tween from rotationY=0 at frame 0 to rotationY=353 at the last frame. I've added the attached code to get the value of rotationY at every frame.

What I see is that the rotation does not increase steadily from 0 to 353. Instead it increases from 0 to 90 and then decreases back to 0 and then goes negative to -90 at which point the absolute values decrease toward 0. This seems like a bug. The rotation of the object is visibly different during the 0 to 90 deg

View 9 Replies

Flex :: RemoteObject Inconsistent Channel Location?

Jul 1, 2009

I have a swf which, for some reason, has four RemoteObjects pointing to the same ChannelId, but they are listing that channel as being at two different spots. In four of the five RemoteObjects, everything behaves as expected, but in the fourth (WidgetService), the version on dev is switching from dev.context.root toloc.context.root. To make matters more confusing, it only does this on the dev server (QA and production are fine, as are local builds).The relevant information from the config files follows:

#This is from build.properties, which is used by Ant
#to build the swf on the server
flex.sdk.dir = /path/to/sdk/flex_sdk_3.2.0.3958

[code].....

View 1 Replies

Flex :: Localization - Fix An Inconsistent Linkage Error In 3?

Sep 29, 2009

I was excited to find out that Adobe released the data visualization for free so I can use the fancy charts and all with my projects even though I don't have Flex Builder Professional. So I installed the new 3.4 sdk along with the data visualizations. Most all of my projects did fine except for one. This particular project uses localizations. Are there any new compiler arguments that I need to include? I current have -source-path=locale/{locale} -allow-source-path-overlap=true. I get the inconsistent linkage error below:

[Code]....

View 1 Replies

ActionScript 3.0 :: Inconsistent SWF File Sizes When Publishing

Jul 1, 2010

I'm having an issue regarding the file size of the .swf file whenever I publish my flash game. Whenever I publish my flash, I get a .swf file that ranges from 2MB (with lots of run-time errors) to 6MB (no errors). This is completely inconsistent, and I get a different size .swf every time I publish. The run-time errors I get when I unluckily publish a .swf that is below 6MB are:
Error #1034: Type Coercion failed
#2022: Class x must inherit from y and
#1009: cannot access a property or method from null reference.
This inconsistent problem started emerging after I turned each .as file in my game into it's own class. Sometimes it works fine. Other times it blows up.

View 6 Replies

ActionScript 2.0 :: Inconsistent _height Of An Animated Clip?

Mar 25, 2011

Attached is a FLA in which a target onPress gets a bullet hole attached to it and folds down. The fall down is made across five key-frames. In each frame the height (H) of the GIF, representing the folding target reduces this way:

frame 1: H=156
frame 5: H=147
frame 3: H=117
frame 4: H=73
frame 5: H=21

instead trace(this._height) returns like this (and every time slightly different):

from frame 1: this._height=156
from frame 5: this._height=147
from frame 3: this._height=117
from frame 4: this._height=99
from frame 5: this._height=99

the problem seems to be caused by the cide line which attaches the bullet hole:
this.attachMovie("bullet_hole_metal","bh"+i,i);

When this is commented out this._height traces correctly.

View 2 Replies

Inconsistent (Fast Or Slow) Playback In Some Browsers?

Jan 16, 2009

Here's the problem: In some browsers, the navigation bar at the top works how I want it to. The "slider" moves over the various buttons rapidly. This is the case for Firefox and Safari on my PC. In others, namely Internet Explorer on my PC, or Firefox on my Mac, the "slider" moves much slower than I would like. Check it out. It might go fast for you, it might go slow.I've programmed before, in other languages, and I have found Flash to be challenging but not impossible. One thing you'll notice right away is that my code is very very messy. I haven't got all the efficient ways down pat just yet.At any rate, here's the entirety of the code involved:

Code: Select all////////////// BEGIN CODE ////////////////////////
stop();
var mcButtons:MovieClip;
var vLmc:URLRequest;[code]............

View 3 Replies

ActionScript 3.0 :: Inconsistent Output Of TextField.height

Mar 20, 2009

I am building a dynamic multi-line textfield that has a backdrop so I need to know about the height of the TextField. Strangely TextField.height will almost always return the right results. But sometimes (e.g. when the last line only has one word) it will return a wrong value with the last line missing. Am I doing something wrong? Or is this known to happen. And is there a good workaround? Should I use getBounds instead?[code]

View 1 Replies

ActionScript 3.0 :: Centering Objects With Inconsistent Reg Points?

Oct 19, 2009

I've always struggled with this sort of stuff, dunno why:

I'm making a vertically scrolling menu with a series of thumbnails. The thumbnails are of various widths& heights. They also have registration points in inconsistent places (ie, not always the same). I want to scale and position the thumbs so that they are all central to the containing menu section. It's probably something to do with adding a container sprite/mc and stuff but I've messed about with it and nowt works.

View 7 Replies

ActionScript 3.0 :: Inconsistent 1060 Error Using FSCommand

Dec 8, 2010

I have two projects that use this same piece of code ...
myButton.addEventListener(MouseEvent.CLICK, myButtonClick);
function mybuttonClick(event:MouseEvent):void{
fscommand("exec","myApp.exe")
}

When I publish the older project I get zero errors but for some reason the same code gives me this error in my new project ...
"Warning: 1060: Migration issue: The method fscommand is no longer supported. Moved to flash.system package. Also, please see flash.external.External.Interface class for Javascript/ActionScript communication."

I am confused why this problem is inconsistent across two projects that both use it. If fscommand is no longer supported shouldn't I get an error on the older project? I am using CS4 and AS3 for both projects. I added another piece of code to the new project on frame 1 that mirrors the older project and I get the same error ...
fscommand("showmenu", "false");

View 4 Replies

ActionScript 3.0 :: Flash ProgressEvent.PROGRESS Inconsistent?

Mar 9, 2011

i have this simple script in my document class named script.as

[Code]...

View 2 Replies

ActionScript 3.0 :: Flash URLLoader Inconsistent Working

Jun 26, 2011

The thing is that i have the following code. It simply does not execute the loader_complete function (found it with adding different traces) In other frame in the same project it does work, identical code. What could be the source of this inconsistency?[code]

View 7 Replies

IDE :: Converting Strings To Numbers - Inconsistent Trace Between PPC And Intel Macs?

May 26, 2009

We're making a simple input text comparisons vs. some constant floating point numbers (e.g. 4.35). Using Actionscript 2 to Flash 9 export.

Code:
trace(typeof(Number(435/100)))
trace(typeof(Number(435/100)==4.35))
trace((Number(435/100)==4.35))

[code]...

In the order listed above, I get the following trace when I export via Flash CS3 (9.0) on my PPC mac:
number

boolean
true
true

[code]....

The same exact FLA file, unmodified, gives the following trace output on 2 different intel macs (one mac pro, one imac) using Flash CS3 (9.0).

number
boolean
false
false

[code]....

have a clue why this is giving falses for statements such as "(Number(435/100)==4.35))", "(435/100==4.35)" or "(Number(input_txt.text)==4.35000)" but ISN'T giving a false for (Number(input_txt.text)==(435/100)) (NOTE: input_txt.text is an input field which contains the string 4.35) I'm expecting the latter since they're generally intel chipsets too??

Note: once i compile the code on my PPC mac, intel macs that run the SWF (but don't recompile the FLA) do return the correct booleans that match the PPC output.

View 3 Replies

ActionScript 3.0 :: Flash Inconsistent Dynamic Text / Embedded Fonts?

Jul 9, 2010

I'm having some trouble getting my fonts to show up correctly. I have the fonts embedded properly, being read from an xml file. Attached is a screenshot - don't mind the terrible colors; it's all brought in through xml. The alignment of the text boxes are not complete, but I have the top headers set up properly, yet the right header is squished down.

View 7 Replies

ActionScript 2.0 :: CS3 Number-cast Input String Versus Numbers - Inconsistent Traces Between Computers?

May 26, 2009

We're making a simple input text comparisons vs. some constant floating point numbers (e.g. 4.35). Using Actionscript 2 to Flash 9 export. Getting totally contradictory traces on two different computers compiling identical code...Here's some simple code we're using to figure out what's going on.

Code:

trace(typeof(Number(435/100)))
trace(typeof(Number(435/100)==4.35))
trace((Number(435/100)==4.35))

[code]....

Also, what behavior do any PC users have? I'm expecting the latter since they're generally intel chipsets too?Note: once i compile the code on my PPC mac, intel macs that run the SWF (but don't recompile the FLA) do return the correct booleans that match the PPC output.

View 1 Replies

Media Server :: Server Side Recording - Inconsistent When Called Automatically?

Mar 23, 2012

We have mutiple live streams(games) in our application and one of our requirement is to record the games when they start and end the record after stop.We have written a servere side Code based on  guidelines provided in the forums. Our Sample code looks like this.
 
Client.prototype.startRecord = function( source, destination )
{
    trace("Recording Stream: " + source + " to: " + destination);
    this.newStream = Stream.get(destination);[code]..............
 
We have written a PHP page which receives the Game Start and Game Stop and calls the FMS  startRecord and stopRecord functions accordingly.We tested this record manuall by passing the values to PHP page and recording works perfectly.Our problem arises when we automate this recording. Every minutes we have 10 games that are created and hence the PHP page calls FMS 10 times a minute to startRecord and stopRecord.Some of the recorded flv are inconsistent and recording is never complete.
 
Can FMS take such sequential request? We are stuck with this because the recording is partial sometimes.We are using FMS 4 with Red Hat. Any other information will be provided.

View 1 Replies

ActionScript 1/2 :: Inconsistent Rotation - 270 Degrees Of Rotation Disappear?

Apr 21, 2009

Program A has a cannon that aims to line up with where-ever the mouse is pointing, in 360 degrees, and fires when the mouse is is clicked. Program B has an eye instead of a cannon that should in theory do similar functions when the capslock key is toggled, but instead only has a 90 degree range of motion from the Right of the eye toward the bottom (quadrant 4 only). Where did the ther 270 degrees of rotation disappear to?

[Code]...

View 4 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







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