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.
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.
I have a simple yet mind boggling problem on my hands,simply put I have a large MC (with its registration point in the center, i need it there), and it sits in a smaller stage (think of it like as if you were panning a map thru a viewer, like google maps) but i need a set of boundaries to prevent it from going haywire. Now i have tried a couple of methods ie [code]The above just manages to stop it but once it reaches that point the drag stops totally.
I am trying to make a Grid that is equal to the width and the height of the flash movie. I have a movieclip called box which is 30x30, and want it to repead along the x to form columns and along the y to form rows so that it makes a big rectangle of smaller squares. For some reason it looks like this:
I compile my Flex application with several swc's (libraries) and it creates a swf file. The sum of the swc's is roughly 4 MB yet the actual swf generated is only 1.6 MB. How is this possible?
I made an SWF file (say X) and I have loaded this SWF file into another FLA file (say Y). With help from this forum, I got to do what I wanted - when I click on a button on the FLA file (Y), the SWF (X) shrinks to a smaller size (about half the size) and when I click on that same button again, X enlarges back to the original size. I acomplished this with tweenlite. THe SWF (X) has a slideshow of images. Now, when the SWF (X) shrinks to a smaller size, the images look very distorted and text in the images are not readable (although the text is large enough to be clearly visible).
URL...I can't seem to figure out why the swf file is so small. I published it at 100% width & height (I want it to be full screen) but it only shows up as 216 pixels tall.
I have a situation wherein I have to keep the size of my flash swf smaller than 215X130 pixel. However, I want to use Microphone, so the permission dialog needs an area at least 215X130.
My swf file is rather large, so I tried changing the quality settings and the publish settings, but nothing I do seems to change the size of the final swf.
My company sent me a video that they wanted us to post on the intranet. It's a simple powerpoint video with a narrator talking about some policy and benefit changes, etc.
I tried the exporting the video in both 720(width) and 1280 format, and found that when shown in fullscreen mode, the 1280 format was much easier to read than the 720, however, we didn't want to show it on the intranet page at full 1280 by default. So I modified the html and javascript that plays the movie so that it would show in 720 width on the page. The problem with resizing the 1280 video into a 720 space is that the video player bar (where the play, stop, volume controls are) becomes extremely small when I do this. Of course, this is because Flash generated the player with a toolbar optimized for 1280, so it's getting scaled down when I pack it into a smaller playing area.
Is there an solution to this that I haven't thought of? How can I generate this movie to get the better full screen appearance of the 1280 video, but also still show the video in a smaller 720 area when the user is not in full screen mode?
I have a question regarding httpstreaming we have fms running with multiple smaller mp4 files about 50 MB in size. When played they start playing immediatly but still are cached/downloaded in directory C:Documents and SettingsUsernameLocal SettingsTemp of the clients
Now we have issues with a large file of 890 MB, which is not being played, clients need to download this complete file to play it. Does the streamingpart doesn't work well on our server?
Please help since we getting a lot of complaints from viewers. Running FMS 4.0.3 on CENTOS 5.7 64 Bit
What can i check besides the forums regarding dynamic httpstreaming
what I want to do is publish my flash file so that it scales down but not up!So if a browser window happens to be smaller than the pixel height, the movie is scaled down but if the browser window is bigger than the pixel size, the movie is not resized and just centered.
if it's possible to prevent a textfield from auto-scrolling on highlight when it's height is smaller than it's autoSize height. selectable = false is not an option, and the smaller height is a requirement, can't make it proper height and then mask it.
I see a number of cool sites and examples using Senocular's TransformTool. Most of them look and function really well. I've downloaded and reviewed the code for a number of different examples.I can see how everyone else's works.I'm having difficulty with 2 points:
1. When I select a movieClip, the TransformTool appears in the correct spot and in the correct dimensions. But the movieClip itself is relocated much above the TransformTool and is MUCH smaller than its original size and the current (and correct) dimensions of the TransformTool. Selecting one of the handles and dragging stretches the movieClip but does not make it the same dimensions as the TransformTool
2. Releasing one of the handles seems to cause the handle to behave in the same way the movieClip did -- you can resize and move the handle.
I found this really neat photo gallery on flashkit but there is no support or readme included. how to size this thing.. the AS code does have comments but I am not a coder.I'd like to make the image window smaller and the overall movie smaller. 325x325 or so
I have a problem with stage resize.I have a small rectangle on the right bottom of my stage. When I resize the stage, I want my rectangle keep its size (no scale) and position ( always on the right bottom of the stage). Here is my code:
From my main flex mxml, I am trying to detect the size of a rect:Rectangle that I created in my InfoBubble.as class. The info bubble itself is created in my InfoMap.as class. How can I access the attributes of the rectangle I created?
Here is the variable portion of the InfoBubble class:
Code: public class InfoBubble extends Sprite { //public var textField:TextField;
I'm trying to change the size of a rectanlge when it is clicked. At the moment, the rectangle increases in size from both the top AND the bottom. I want to have it so that when it is clicked, only the top of the rectangle increases.
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();
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.
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
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.