ActionScript 2.0 :: Can't Draw A Dashed Border

Feb 1, 2004

Here's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...

I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width.[code]...

View 3 Replies


Similar Posts:


Actionscript :: Draw Rectangle With Dashed Border In Flex?

Mar 21, 2011

Draw rectangle with dashed border in flex ?

View 3 Replies

ActionScript 2.0 :: Rendering A Dynamic Rectangle - Draw A Dashed Border?

Feb 1, 2004

Here's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...

I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width... Anyone mind taking a look to see what I'm doing wrong? It seems like the moveTo function isn't behaving right when I get to the end of each line.

[Code]...

View 3 Replies

ActionScript 3.0 :: Draw With Dashed And/or Dotted Line?

Apr 20, 2011

As i understand, flash cant assign dashed or dotted linestyles. Ive googled it for a while and found 2 classes which actually draw dashed and dotted lines, but i can't manage to implement it with my drawing tool.

[Code]...

View 0 Replies

ActionScript 2.0 :: How To Draw A Border

Apr 20, 2007

I have a template which loads thums form XML file, i want to modify the thumbs to have a border around each one and alfa rollover effect.

Code:
function createThubmnail(thumbURL) {
thumbsHolder.attachMovie("itemPhoto", "itemPhoto"+photoN, photoN);
eval("thumbsHolder.itemPhoto"+photoN).picture.picture.loadMovie(thumbURL);
eval("thumbsHolder.itemPhoto"+photoN).d_w = widthThumb;

[code]....

View 2 Replies

ActionScript 3.0 :: How To Draw Border Around MovieClip

Nov 5, 2007

how to draw a border around image or movie clip?

View 11 Replies

ActionScript :: Draw A Border Around A Masked Image?

Jan 20, 2010

I'm trying to write some ActionScript which will accept a mask and an image, then mask the image and put a border around the result (assuming that the mask is always 100% opaque).

For example, if my mask is a poorly drawn star, and my image is a bunch of flowers, I want the result to be a poorly drawn star with flowers inside it and a border around it. Something like this:

View 2 Replies

Flex :: Draw A Joined Border Around Two Components?

Mar 16, 2011

Let's assume I have an Image that's used a button. By default, the image has no border around it. Clicking on this Image will cause another component be displayed beneath it or next to it. When the second component is displayed, I want to draw a joined border around the Image and the second component.

The second component would not be visible by default. It would only be visible after clicking on the Image by using the popupManager, PopUpAnchor, setting the visible property, etc.

Example before clicking:

+--------------------------------+
| |
| XXX <-- My Image |
| XXX |
| |
| |
| |
| |
| |
| |
| |
+--------------------------------+


Example after clicking:

+--------------------------------+
| +---+ |
| |XXX| <-- My Image |
| |XXX|_______________ |
| | | |
| | My Second | |
| | Component | |
| | | |
| | | |
| +-------------------+ |
| |
+--------------------------------+


How difficult would it be to create something like this?

View 2 Replies

ActionScript 2.0 :: Draw A Filled Rectangle With No Border?

Mar 25, 2006

I'm trying to draw a filled rectangle with no border. Here's the code for my test project:

ActionScript Code:
myMC = this.createEmptyMovieClip("", this.getNexthighestDepth()-1);
myMC._x = 0;

[Code].....

If you take a look at the coordinates, this was suppose to draw a 180x22. Well, it looks lika it draws a 180x22 rectangle, but only if the zoom is at 100%. If I zoom in on the flash player, there are two problems:

1) the line, as it is scaled, goes over the shape edge. Basically, as the border line has 1 pixel, Flash starts do draw it half pixel up and half pixel left; 2) the rectangle is in fact a 179x21 pixels, instead of the 180x22.

I'm sending an example project on an attachment. In this example I have 2 vertical rectangles which act as buttons:

1) the first button draws the rectangle step-by-step;
2) the second button cycles through 3 different styles:
2.1) line with 1 pixel, normal border rescale. This is the style at start;
2.2) no line;
2.3) line with 1 pixel, no border rescale.

The background is a checker texture, with 1 pixel per square. This gives you a perfect look on how the line is drawn.

The drawing instructions are executed on the yellow movieclip, which serves as reference, considering that it has the desired dimensions (180x22). *

If you zoom a couple of times you'll be able to see the problems I'm experiencing.

All you have to do is to click the first vertical button several times to draw the lines, to press the second vertical button to reset the draw and to change the border style, and finally to look at the draw with some zoom in, in order to see it in detail.

So, what can I do in order to draw a perfect rectangle, meaning that the border will not go outside the shape (it would be nice that when the border is rescaled, it does it inside the boundaries of the shape) and the rectangle has right dimensions (why am I missing one pixel in each direction?).

* By the way, is there a way to draw in a movieclip using the lineTo in such a way that the drawing is on the topside instead of the bottomside? I had to make the yellow rectangle partially transparent in order to see my drawing.

View 9 Replies

ActionScript 3.0 :: Draw Border For Even/uneven Shape Object?

May 25, 2011

how to draw border for even/uneven shape object? it is stored in a movieclip

View 0 Replies

ActionScript 3 :: Merge Shapes And Draw Border Around Final Result?

Jun 17, 2010

I can't post images yet: [URL]. Using Actionscript 3 I'm drawing multiple Shapes onto a MovieClip [top drawing]. The end result I need is the bottom drawing. I originally thought it would be simple to just merge the shapes and then find a way to draw a border around the end result but I can't seem to find any way of doing this. Is this possible or is there a better way of trying to do this?

View 1 Replies

Flex :: Spark BorderContainer - Draw Border For Specific Sides?

Dec 6, 2010

Is there a way to easily specify on which sides a border is drawn for Flex 4's Spark BorderContainer?[URL]But that uses MX styling which seems like a hack. Is there a better or 'correct' way without having to build a skin? It seems incredibly silly to build a skin for a 'Bordered' component when this is a very common use case.

View 1 Replies

Flex :: Draw / Place Border Around Both Checkbox And Label Portion Of It?

Jan 3, 2011

I have been doing much research on this - including creating a custom skin but cannot seem to be able to do it. I just want to have one border around both the checkbox and label. I also want a background color which I did manage to via opaqueBackground property (setting it via AS3). Just can't seem to find the key to have a border as well.

View 1 Replies

Flex :: Draw A Circle Inside Border Container Using Graphics Object?

Apr 5, 2011

My basic requirement is to draw a circle inside a BorderContainer with the layout set to BasicLayout.I run this method in the CREATION_COMPLETE event of the BorderContainer object.[code]I know I must be missing something VERY basic here. Can I just draw like this OR should I draw in some other event? I know that I can create a Ellipse object and easily add it to the border container but I would like to know how I can do this using the graphics object.

View 3 Replies

Flash :: Grey Dashed Guide Lines In It?

Nov 17, 2011

[url]...

I received a Flash project from an outside source. In it I found that some library items had these grey, dashed guide lines. It seems like they are used for assigning resize boundaries or something. Anyways, i can't reproduce them in my own library elements nor can I find any information on them.

View 1 Replies

Flex :: Display My Column Chart In Dashed Manner

Sep 7, 2010

I have got a new requirement in which i have to display my Column Chart in dashed manner.

View 1 Replies

Flex :: Graphics - Create A Rounded Rectangle With A Dashed Line?

Jun 14, 2010

How can I create a rounded rectangle with a dashed line? I've seen several routines that draw their own straight lines, but nothing for rounded rectangles.

View 2 Replies

Flex3 :: Drawing A Dashed Line Across Tops Of Flex Column Chart

Mar 15, 2010

[code]This code is drawing a colum chart with two columns and drawing a line across the top of both columns. I have two requirements: the line need to be dashed as of now the line starts from top right corner of the first column to the same corner of the second column. How can i shift the line to the left, so that it starts from center of first column to center of second column.

View 3 Replies

Flash - When Drawing A Freehand Line With The Cursor, How To Make It A Dashed Line

Nov 23, 2011

I am using Flex 4 and AS3 and I am trying to make it so that the user can draw a freehand line with the cursor - I have this part done.However, I also need the line to be a dashed line instead of one solid line like it is now. below is my code I am using. I have found some examples on how to do this, but they are all for straight lines, not for a freehand line.

Class File (DrawingArea):

package
{
import flash.display.BitmapData;
import flash.events.Event;
import flash.events.MouseEvent;

[code]....

View 3 Replies

Professional :: Getting Dashed Lines Between Keyframes After Select "Motion Tween" In The Properties?

Nov 6, 2010

I keep getting dashed lines between keyframes after I select "Motion Tween" in the properties.  Even a bouncing ball won't give me a solid tweening line in the Timeline. I created symbols and all but no go.

View 5 Replies

ActionScript 3.0 :: BitmapData Draw() Method - Draw The Bitmap On The Stage At Design Time?

Mar 18, 2009

I am using the draw() method of the BitmapData to encode a jpeg of part of the image. Now this should be easy enough given the object I want to draw to the bitmap is on the stage at design time so I know its location and dimetions exactly! Heres the code I have in place.

Code:
var myBitmapSource:BitmapData = new BitmapData ( street.width, street.height, false, 0x333333);
myBitmapSource.draw(street, null, null, null, new Rectangle( 96, 5, 571, 450 ), true );

I know for a FACT that no part of the street clip I am drawing out is in negative space, and it's registration is (0,0). However, it cuts off A lot of the top of my image. y=5 in the above rectangle is where I need the top to be, but it cuts the top off of the image... even if I change it to 0, it has no effect.

View 2 Replies

ActionScript 3.0 :: Youtube Api Draw - Error #2121: Security Sandbox Violation: BitmapData.draw

Jun 30, 2011

I'm making something that requires me to draw() the youtubeplayer Giving me this pretty error:

[Code]...

View 4 Replies

ActionScript 3.0 :: BitmapData.draw() Failing To Draw Entire MovieClip?

Dec 15, 2009

I'm trying to do some lean blitting for an object that rotates by rotating it once at startup and capturing a BitmapData snapshot of each 5 degrees. The problem I'm having is that the draw() method of the BitmapData object is only picking up pixels in the MovieClip that are below and to the right of the registration point. If I change the MC so that the registration point is in the top left corner, I sometimes get what looks like most of the pixels, but the entire object rotates into and out of the frame, since it's rotating around the corner and not the center.

View 5 Replies

Actionscript 3 :: Movieclip - Draw Line Without Using The Draw API?

Apr 5, 2012

I need to be able to draw a thick patterend line between 2 points in AS3, I can't use the draw API because it doesn't all me to actually put detail (pattern etc) into the thickness of the line, I thought about perhaps using the line to create a bitmap version and then using that as a mask, but I remember many years ago seeing some examples that use a movieclip as a source for a line.

View 1 Replies

ActionScript 3.0 :: Using BitmapData.draw(stage) - Error #2123 Security Sandbox Violation: BitmapData.draw

Jan 9, 2012

I am having an issue with using BitmapData.draw(stage). I am getting the following error:

SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: file:///C|/Documents%20and%20Settings/bla...bla...bla.swf cannot access null. No policy files granted access. Here is a portion of my code:

var bd:BitmapData = new BitmapData(2800, 2100); bd.draw(stage);//this is where the error happens All of the files referenced (.xml/.jpg/.swf) are located in the same local folder as the main .swf. How do I get around this error? The main objective is to print the stage using PrintJob(). I am using Flash Professional CS5.5 and publishing to Flash 10.0/10.1. Let me know if I need to supply any more info.

View 4 Replies

Flex :: BitmapData Draw - Set Where To Draw?

Dec 16, 2010

i have a class thats create a class with bitmapData that merge 2 IBitmapDrawable. one of them is 24*20 while the other is 16*16.i want to draw the smaller first in a bitmapData object which its width and height are 24*20 but i want to draw it in the center of the big bounds.

[Code]...

View 2 Replies

Border At Top Of Clip?

Jul 2, 2010

i have a bit of an odd problem, when i view my swf clip online there is a large white border accross the top of the screen, i don't really know why as when i made the file there is no border, obviously there is a setting or something that i need to change

View 1 Replies

PNG Showing A Border?

Jun 6, 2009

I have a png file dropping into a flash background and I am getting a black line around the png. Anyone thoughts on how to get rid of it. I also made the png bg to 1111111 the same as the fla file background

View 12 Replies

Annoying Border Around SWF In Firefox

Mar 3, 2009

I've been working on my website - [URL] - and whenever I load the page up in firefox there's this annoying border that goes around the swf when you click on it.

View 17 Replies

Professional :: Webpage Without A Border?

Apr 20, 2010

No matter what I do though, when I publish the fla file, a small margin appears around the edges.Now, without adjusting the html, can I get the fla file to publish without a border so that it appears naturally as 'full' within the browser?

View 11 Replies







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