Flex - Erasing Components On Canvas?
Oct 6, 2010
The problem is when background of top or below label is changed, the top or below button is erased.
<mx:Canvas width="100%" height="100%">
<mx:LinkButton icon="{icon1}" width="25" x="10" y="10"/>
<mx:LinkButton icon="{icon2}" width="25" x="10" y="100" />
<s:VGroup width="100%" height="100%" id="lst" click="highlight(event.target as Label)" gap="0">
<s:Label />
[Code]...
So do anyone know the possible solution for this problem?
View 1 Replies
Similar Posts:
Aug 4, 2011
I've a custom component where I do some graphics (e.g draw a line) and dynamically add a subcomponent (e.g a label) to it.
If I base the component off Group (which is recommended as per docs since its a spark component) then when I dynamically add a label the graphics part disappears.
However if I base it off Canvas this doesn't happen.
Why is that the case?
Here is the code.
MyComponent.as
public class MyComponent extends Group
{
public var x1:int;
[Code].....
View 2 Replies
Jun 5, 2009
I have the following code in my flex project.
[Code]...
I want to dynamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.
View 1 Replies
Apr 9, 2011
I'm trying to skin a canvas with an image (which is essentially a custom border for the canvas). I've been trying the backgroundImage style as well as the borderSkin style. I can't get the image to scale to the full size of the canvas though. I was wondering what the best way to go about this is.[code]...
View 2 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
Jan 17, 2010
Flex charts, like AreaChart, have wonderful built-in support for displaying data "tool tips" when a user hovers over a point supplied in the data of a graph. You can hover over any of the bar graph examples on this page for a demonstration. I have a graph situation where I optionally draw in some dots as reference points on CartesianDataCanvases supplied to my AreaChart through it's <mx:annotationElements> and <mx:backgroundElements> tags.
I would like to have the same hover data-tip functionality that the AreaChart has, but applied to these dots. I realize that I am just drawing on canvas, and that no actual dataProvider supports these dots, but if there was a way to supply the CartesianDataCanvas with an array of data values or something to that effect,
View 1 Replies
Jan 20, 2010
I'm developing an engine to generate components.I been wanting to get my xml script that read and create a component to be load into 'content' canvas. I not sure how do I get the addChild work correctly as in 'content'.addChild instead of the one shown below:[code]
View 1 Replies
Dec 27, 2009
The basis for the chat window is a canvas. I've got that showing, but how do I make it scroll up? I want to clip the window so only the last 15 lines are shown.[code]...
View 1 Replies
Dec 8, 2010
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Canvas width="100%" height="100%">
<mx:Canvas backgroundColor="#A8A8A8" height="100%" right="0" top="0" width="100">
</mx:Canvas>
[Code]...
My code above works absolutely fine, until i resize my browser window to a size below 800px width. When the browser window is make of lesser width than 800px, the canvas with background color #A8A8A8 is on the right of the window, but the problem is, when I move the scroll bar, the canvas should remain on the right of the window. Which does not happen, and that is what my problem is.
How can I solve this issue. What should I do to keep my canvas be on the right=0 all the time.
View 1 Replies
May 18, 2011
I want to lie two canvas at one Tab Navigator. when I use <mx:local it created multiple tab.
View 1 Replies
Dec 23, 2009
I'm trying to write some code to an animated images of squares on a Flex Canvas There's something wrong with my code below because it becomes progressively slowerI assume I'm supposed to clear the old squares or something.What am I doing wrong below?:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();">
<mx:Script>
[code].....
View 1 Replies
Feb 24, 2011
Basically I want to go to frame2 when the cursor leaves the canvas. The code below contains no errors when tested but it still does not work.
[Code]...
We know that the function gotoAndStop(frame2); works in multiple situations which means the first 3 line is fine. I don't know if the problem is the MOUSE_LEAVE event or this.stage which i suppose is the identifier for the canvas. I sure that there must be an alternative code for the identifier this.stage or the whole code. Any solution on how to fire the given function in the event when the cursor leaves the canvas?
View 2 Replies
Jun 19, 2009
i am required to zoom a canvas through Hslider. The problem is after zooming the canvas i cannot scroll to the extreme left and top of the canvas i.e some part of left and top canvas are not visible. i cannot find the reason. The source code for the example is given below.
[Code]...
View 3 Replies
Jul 27, 2009
Is there a way in Flex by which a disabled canvas looks exactly the same as an enabled canvas? I haven't been able to make sense of disabledOverLayAlpha and disabledColor properties for a Canvas component.
View 1 Replies
Jul 29, 2009
a .fla is 500 x 300. Inside, content moves OUT of the 500 x 300 stage so that it appears like it hides or moves off of the screen. .fla complied... loaded into Flex via SWFLoader:
<mx:Conainer width="500" height="300">
<mx:SWFLoader width="100%" height="100%" />
</mx:Conainer>
Loaded .swf file shows outside of the 500 x 300 Container in Flex. How can i get it so that only what is INSIDE of the Container is visible?
View 3 Replies
Aug 3, 2009
Is there a way to programmatically scroll the canvas to its topmost position?
View 2 Replies
Dec 13, 2009
I am creating a canvas in actionscript like :
private var cvs_preview:Canvas = null;
[Code]....
So on the focus change i want to run the "end_preview_on_focus_change()" but this is not working. As per my understanding, i think the canvas not getting any focus in the first place. I was trying to use focusManager.setFocus to do that after the canvas's creation complete. but even that is giving me an error.
[Code]...
View 3 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 4, 2010
I'm trying to create a custom tab navigator that has to look like. Also, when there's a rollover, the borders of the arrow have to be in blue (like the label in the current tab). For that purpose, I've created a custom component: a hbox containing a label and a canvas with 3 images inside (for the arrow tip that has to change depending on the currentState). Then, I thought of overlapping the components in order to get the blue highlight color (ex: arrow button 3 is over arrow button 4. The image of the arrow tip in button 3 will be transparent outside the arrow, so that we can see the black color of the following button).
I'm now trying to position the components inside the canvas ... but I cannot. After the creationComplete event, I assign the label text and I was calculating the coordonates of the component but it doesn't take into account the label width... -_-'
View 1 Replies
Oct 22, 2010
i am trying to add a uicomponent which contains an object of a custom class the extends UIcomponents and i want to display this uicomponent to canvas i have done no error compile or run time but it does not display the Uicomponent.
here is code;
var item:RecordRanderer = new RecordRanderer();
item.randerItem(child);
item.x=20;
[Code]....
View 2 Replies
Oct 24, 2010
add childs to canvas. I want to add childs to canvas in top-down direction and left-right direction? I'm using the addChild function but I don't want to calculate the X and the Y for each Item. is there a way to do that?
View 1 Replies
Dec 13, 2010
I'm trying to draw lines on a canvas object. When the width of the Canvas is less that the width of the line, it draws outside the Canvas over other elements. I read about this problem and I try to resolve using a inner Canvas with a longer height so a scrollbar appears.But I also read that this problem can be correct using a mask but I do not know what is the better way. Which do you recommend?
<mx:Canvas id="panelContentECG" width="100%" height="400" backgroundAlpha="0.5" styleName="miCanvas" borderStyle="solid" cornerRadius="20" borderColor="0xFCFE00" horizontalScrollPolicy="off">
[code].....
View 1 Replies
Dec 30, 2010
I'm trying to draw a String inside a canvas. The text and the position of the String changes pressing differents bottoms. For doing so, I create TextFields which I added to a sprite which I added to a Canvas:
canvas.rawChildren.addChild(spriteNombres);
The first time everything works fine but when I press the bottoms,it does not refresh and appear the old textfields and the new ones.I cant remove the old ones, I try with removeAllChildren and also trying to delete one by one with removeChildrenAt. I do not know if I'm doing something wrong or maybe this is not the best way.
I also try creating bitmapdata and drawing in the sprite inside a rectangle.
var channelName: TextField = new TextField();
channelName.text = channelNames[displaySequence[channel]];
if (channelName.text != null) {
[Code].....
View 1 Replies
Feb 1, 2011
I'm doing an application in flex where I draw different sprites inside a canvas. Depending of the dimensions, scrollbars can be appear. I would like to move the "image" with the movement of the mouse as you can see at the Adobe Reader when you are reading a document with zoom (hand mouse icon). In this way, you dont have to touch the scrollbar.I'm start trying with drag and drop properties of the canvas, setting the position of the scrollbar according with the movement of the mouse but that is not as I expect.
View 2 Replies
Mar 31, 2011
Anyone here know the maximum size of a Flex canvas or UIComponent? I know the old MovieClip class was limited to 2800x2800px.
View 1 Replies
Mar 31, 2011
I was wondering how you can use the matrix to increase the component of the canvas!
View 1 Replies
Apr 30, 2011
First off I have this MXML:
<mx:Panel x="270" y="10" width="690" height="680" id="mainContainerPanel">
<mx:Canvas x="270" y="10" width="670" height="640" id="canvas" initialize="onInit()">
[Code]....
The circCentre Sprite never appears on screen and I don't understand how I can get it to appear.
View 1 Replies
Sep 4, 2011
I am trying to load a BitmapImage from an embedded source image and add this to a UIComponent. I am attaching the code that I have below. I have not been able to get this to work.
var bitmap:BitmapImage = new BitmapImage();
bitmap.source ="@Embed('sample.jpg')";
var graphic:Graphic = new Graphic();
graphic.addElement(bitmap);
thumbHolder.addChild(graphic);
When I run this I dont get an error, but no image appears in thumbHolder (My UIComponent).
View 1 Replies