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
Similar Posts:
Mar 21, 2011
Draw rectangle with dashed border in flex ?
View 3 Replies
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
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
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
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
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
Nov 5, 2007
how to draw a border around image or movie clip?
View 11 Replies
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
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
May 25, 2011
how to draw border for even/uneven shape object? it is stored in a movieclip
View 0 Replies
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
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
Aug 22, 2010
Do you know any flex component with the functionality such as horizontally collapsible window or panel I found arc90, but it folds vertically.
View 1 Replies
Sep 8, 2009
I am created a dynamically adding a VBox, that contains two images. Into a Custom Component that is derived from UIComponent. The problem is the Vbox that contains the two image is only a really tiny size. I would like the VBox stretch to the size of the two images. This is how I am creating the Vbox....
[Code]...
View 1 Replies
Sep 15, 2010
Is it bad practice/design to nest components inside components using Flex 4? Should I simply be creating components and inserting them into my main application as below, or doesn't it matter?
<com:MyComp1>
<com:MyComp2>
<com:MyComp3>
[code]....
View 1 Replies
Nov 1, 2010
I have a long movie 22 000 frames at 30 fps so I had to split it into two parts. I have joined them with AS. Can I have a slider that scrubs the timeline from part1 to part2 of my movie? Is this possible?
View 7 Replies
Feb 20, 2004
I'd like to be able to use some raw 3d coordinates from a text file and display them, joined sequentially in a wireframe model. Then be able to rotate, scale etc the resulting model. The coordinates aren't from a 3d drawing package but rather measured - therefore each point is literally assigned three numbers, in a tab delimited file. With a large number of points (i.e. over 100) is there a way to load in the file and then generate the resulting model?
View 2 Replies
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
May 13, 2010
I am working on an custom container and I need a border for this container. I have a 15x15 image that I am creating a 9-slice border skin with. The issue that I am having is that the border skin does not appear the way that I had hoped it would.
Here is a ss of the skin in place.
Ideally I should have a transparent box with a 5 pixel border around it.
Here is my current testing code:
CSS Code:
Box
{
borderSkin: Embed(source="15x15.png",
scaleGridLeft="5",
[Code]....
View 1 Replies
Aug 17, 2011
In Flex 4, I have a canvas that I'd like to set border-width on via css. I can set the border color and border style, but the border width remains 1 pixel wide no matter what.
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
[Code]....
View 2 Replies
Feb 26, 2010
I have three MCs in a proximty menu (ie when the mouse is close they go to the mouses position and follow it).
My question is, I want the MCs to be joined by a 1px line and when the MC moves the line stretches and moves with it...how do I do this?
This maybe a bad explanation so here is a link to back it up...
[Code]...
View 1 Replies
Mar 17, 2010
if I place a Border with width and height of "100%" inside a Group with width and height of 10 pixels the Border looks bigger than 10 pixels, why?
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
>
[Code].....
View 1 Replies
Jul 26, 2010
In flex, I am using
canvasEdit.setStyle("borderColor", 0x0134FF);
canvasEdit.setStyle("borderThickness", 3);
note: canvasEdit is of type Canvas.
But I am not able to put border on the sides of canvas.
View 1 Replies
Aug 29, 2010
I have a MainPage, on initialize I am calling a method which would create a SWFLoader object (aka LoginPage) and loads it in the MainPage. When we run the MainPage in 800x500 window, the LoginPage loads in that window size, however when we maximize the window the content of the LoginPage gets resized to 1027X660, but the border remains 800x500, and the remainig area of the window stays blank.
View 1 Replies
Sep 18, 2010
I have an old Flex app build with the Halo library. Now that Halo was changed to mx library, it makes the old Border component stop working and I'm unable to build the project anymore. Even when I try to change the library to MX, the Border cannot build.
View 1 Replies
Oct 4, 2010
How do I add a border to a Flex VBox? My VBox is the renderer of a List. I've tried the following without success (in particular VBox's borderVisible="true" borderStyle="solid" borderColor="0x888888"):
<mx:List id="myList" dataProvider="{myData}"
width="100%" height="100%"
variableRowHeight="true"
[Code].....
View 3 Replies
Mar 31, 2011
Is there a way to Set a a focus border on a datefield when it is selected and change the border to some other colour when we lose focus from the datefield.
View 1 Replies
Apr 17, 2011
according the documentation borderThickness is an applicable style, but when I try to set it to anything (would prefer '0') it says "The style 'borderThickness' is excluded by type 'mx.controls.DateField'."I could style the background color to be the same as the background, but I have an image behind so this will not work.
View 1 Replies
Sep 6, 2011
Is there a way to remove the left+right+bottom border of a mx:Panel?
basically I want to have the right UI instead of the left one ( check the screenshot )
I know that the default spark Panel is able to do so, but I just need to use Flex 3.
Here is what I tried already :
padding (seems only changing the children)
borderStyle = none is removing the color of the header
View 1 Replies