Flex :: Creating Programmatic Skins For Canvas

Mar 24, 2010

I am having 2 problems creating programmatic skin for Canvas.

First problem: I would like to have background with rounded corners and I am using GraphicsUtil.drawRoundRectComplex in order to have round corners for only the upper two corners. The problem is that drawRoundRectComplex takes for each corner one single parameter - the corner radius. However my scaleX and scaleY factors are different and in fact the corners are not properly rounded because I either can set the radius using scaleX or scaleY. Graphics.drawRoundRect is better because it takes two parameters for the corners - elipse width and height and then you could apply both scale factors but it doesn't allow me to specify different radius for different corners. How to use GraphicsUtil.drawRoundRectComplex when scaleX and scaleY are different.

Second problem: Even though I set my programmatic skin through style - <> the skin's updateDisplayList gets executed only once and after that somehow "backgroundImage" style gets "undefined" and my programmatic skin is not associated anymore to the Canvas instance. As a workaround I am setting on each resize event "backgroundImage" style again but this is ugly. What could cause such "silent" resetting of the "backgroundImage" style to undefined?

View 1 Replies


Similar Posts:


Flash :: Design Tools For Creating Skins For Flex 4 Components

May 11, 2010

I'm looking for a tool to create just the skins for different kinds of Flex 4 components.I'd like to be able to create the components myself and have the designer/artist do the skin, but I don't think they'd like the idea of doing them by writing MXML files.

View 2 Replies

Flex :: Dynamically Add Different Items To ThumbContent Canvas And Use Scroller Canvas To Scroll

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

Flex :: Skin A Canvas With Image And Scale It To Size Of Canvas In It?

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

Flex :: Programmatic Skinning Of PopUpButton?

Aug 26, 2011

I am trying to programmatically skin a PopUpButton control in Flex Builder, but having no luck. As far as I know this requires writing a custom skin class or creating a modified version the control class itself (since the control is MX and not Spark). Again, just to clarify, I want to programmatically modify the appearance not simply set styling properties or display an image. I've been able to do this programmatically with other MX controls (e.g. tabs in a tab navigator), but not with the PopUpButton.I think part of the problem may be that the control is actually composed of two separate buttons, so you cannot draw just one rectangular area over the whole control.

View 1 Replies

Flex :: Animate Between States In A Programmatic Skin?

May 12, 2010

I have a button with the various states (up/over/down etc) that uses a skin file to render the display. I want to achieve animation between the states. For instance, between the change from 'up' to 'over' I want to fade in a color and a border.

The way I am doing this at the moment is to use viewstates and animate between them using transitions and the mx:AnimateProperty. However, using this method I can only animate one property per viewstate. So only the border, or the color can be animated.

Does anyone know how I can achieve multiple animations on multiple properties of a programmatic button skin?

View 3 Replies

Flex :: Programmatic Manipulating With Chart Elements In AS3

Dec 5, 2010

When I hover the mouse above the chart elements, it can show some standard hints. How can I show the tooltips without hovering?

View 1 Replies

Flex :: AdvancedDataGrid Multi-column Programmatic Sorting?

Jul 30, 2009

I need to to a programmatic multi column sorting on the AdvancedDataGrid.The issue is, currently I am implementing paging on my grid. So, if I sort the data,only the perticular page is being sorted. So,I need to sort the entire list by the column criteria.I tried HeaderRelease event,but I guess it is of no use as I need to make a round trip call to the server to get the sorted data.Is there any way I can implement that.I also need to show the sort markers in the Column headers' right position, indicating the sort numbers and direction.

View 7 Replies

Flex :: Programmatic Equivalent Of Tag-based Event Handlers?

Feb 10, 2011

When I create something like the following:

<mx:DataGrid id"myDataGrid"
itemEditBegin="myDataGrid_itemEditBeginHandler(event)" />

When does the event listener for "itemEditBegin" get added and removed? Is this essentially the same as:

<mx:DataGrid id="myDataGrid"
creationComplete="myDataGrid_creationCompleteHandler(event)" />
protected function myDataGrid_creationCompleteHandler(event:FlexEvent):void
{

[Code]...

Basically, I'm wondering where I should add "myDataGrid.addEventListener" if I want to do it programmatically? Should it be in the creationComplete listener function of the object itself, or perhaps in the creationComplete listener function for whatever parent object it resides in?

View 1 Replies

Flex :: AMCharts - Programmatic Scroll On Horizontal Axis

Nov 20, 2011

I would like to scroll the amcharts flex stock chart programmatically on it's horizontal axis, in other words along the time axis. I need to do this, because I need to scroll one period at a time and would like to hook this up to keyboard events. I couldn't find anything in the documentation here: [URL]. I've also tried mucking around with the period selector to see whether I can change the values on it, but no luck there.

View 1 Replies

Flex :: How To Use Available Skins

Sep 24, 2011

How to use the skins shown on various sites e.g flex skin site into my flex project.

View 1 Replies

Flash :: Creating Content With HTML5 Canvas Much More Complicated Than Authoring?

Jan 19, 2011

I've been doing Flash for couple of months and I love it. I can easily use a rectangle tool to draw a rectangle and do shape/motion tweening within seconds.

Lots of people are talking about HTML5 vs Flash nowadays and I took a look on HTML5 Canvas today. To my surprised, I see whole bunch of "code". It's so complicated, they need to make a lot of calls (fill, stroke, moveto, closepath etc...) to make a simple shape. And even dozens lines of code mixing with javascript to do a simple movement???

Am I missing something? It'll make animation 10x more complicated with HTML5 Canvas than Flash.

View 6 Replies

Actionscript 3 :: Creating Modal Popup Canvas Window In A Parent Page?

Nov 3, 2011

I am creating modal popup canvas window in a parent page. When I close the popup how do we get notification in parent screen that child popup is just closed.

View 3 Replies

Flash :: Using Skins Without Embedding In Css Doc And Swf In Flex?

Oct 23, 2009

The issue I am having is creating an application with nearly every component skinned using CSS. The majority of the components are skinned using:Embed(source="file.png");method. The problem I am running into, is flex trying to compile all of the embedded assets into the final swf. As it stands now, my compiled swf stands around 16mb!@@ OUCH. It is a very large application, but not that big. Any ideas on how to load the assets into the application at run time, or on request maybe?

View 2 Replies

Flex :: Applying Skins Through Actionscript

Feb 25, 2010

I have a problem in applying the styles for scroll bar skins through actionscript.[code]How can we specify scaleGrid properties in the above statement?

View 1 Replies

Flex :: Skins Not Loaded In Sub-applications ?

Jul 29, 2010

we try to develop a flash game engine with several abstraction layers. This flex project contains: an Application (1)-> loading a class (2)-> loading another class (3) which instanciates a Flex component (4).

The loadings uses SWFLoader. The last Flex component (4) is just a Group with AdvancedDataGrid. We do not define skins so I suppose it must take default skin.The problem is that during execution, an error is throwed because default skin for components cannot be found in the Flex component (4). In our case, for the AdvancedDataGrid:

Error #1007: Instantiation attempted on a non-constructor.In mx.controls::AdvancedDataGridBaseEx. The guilty command is: getStyle("headerSeparatorSkin"); which returns null

For the moment, we found two solutions :

the first solution is to add the attribute headerSeparatorSkin="spark.skins.SparkSkin" into the AdvancedDataGrid of the Flex component .

View 2 Replies

Flex :: How To Make Progressbar Skins

Sep 29, 2010

I wanna set a custom skin on my progressBar, but it's not working out the way I want it to. My skin has 3 different colors on it (green, yellow, red) and green should show until it's about 50%, then I want the yellow to appear after green and the red at 90% after green and yellow. So at 100% they should all show.The problem is that the ProgressBar only sets the width of my skin so all colors are showing at all times. But if I use the indeterminateSkin but dont set indeterminate to true that doesn't happend.How can I make a skin that doesn't just change width? Atm I'm just using a MovieClip for a skin.

View 1 Replies

ActionScript 3.0 :: Flex How To Delete Skins

Feb 2, 2010

basically I want a list component but without the skin. So it looks like it's just floating over the stage area... Or is there a better way of doing this?

View 1 Replies

Flex :: Skinning - HSlider - Set Different Skins For Different Thumbs?

Jul 1, 2009

I am going to use a HSlider to set a range of values. I would like the left thumb to look like ( and the right thumb to lok like ) so they appear to encompass the range like (range) instead of |range|. I only know how to set the skin for SliderThumb which will set the skin for both. Does anyone know of a way to set a different skin for each thumb?

[Code]...

View 3 Replies

Flex :: Get An HSlider With Skins For Each Side Of Thumb?

Oct 12, 2009

I'd like to create an HSlider so that the skin of the track is different on either side of the thumb. So, for example, the track on the left side of the thumb is green, but red on the other.Is this possible or will it take a custom component?

View 1 Replies

Flex :: Applying Dynamic Styles To Skins

Dec 24, 2009

I want to be able to style or set properties dynamically.[code]I want to be able to set these properties in the skin so the skin can be styled differently for each component that uses it.

View 1 Replies

Actionscript 3 :: Where To Find The Default Flex 4.5 Skins

Apr 13, 2011

locate the default skin files for Flex 4.5. I want to see how the inner shadow effect has been drawn so I can use the same technique in my own custom skins but I can't find them in the SDK.

View 1 Replies

Flex :: Possible To Use Different Skins In A Class Based On Some Conditions?

Apr 21, 2011

We are building an application which is using skin classes in mxml. We plan to build different variants of this application for different user segments, where most of the functionality remains same but only skins vary based on the user segment.We are adding skins to the application by the following syntax:

<s:BorderContainer id="Banner" height="15%" width="100%" skinClass="mySkins.backgroundSkin"/>

Is there a way we can have a skin based on some conditioni.e if usersegment = "A" then use myskins.backgroundSkin1, else use myskins.backgroundSkin2?

View 2 Replies

Flex :: Customization - Use Different Skins For Different Components Or To Use Just One Big Css That Has All The Styles Together?

Aug 11, 2011

When you have a flex project, is it better to use different skins for different components or to use just one big css that has all the styles together?

View 1 Replies

Flex :: Button Skins Return To Default?

Aug 20, 2011

I have a problem which involves skinned buttons returning to their default skins after certain actions occur in my application. Below I have included a partial screenshot where you can observe the problem.The left button is returned to its default skin after it was clicked (the click triggers a state transition). The right button is the default skinned button. Note that my mouse is neither over nor pressing the left button.The code for the Button Skin is as follows:

<?xml version="1.0" encoding="utf-8"?>
<fx:Metadata>
<![CDATA[ [code]......

View 1 Replies

Flex :: Skinning - Use StyleManager.setStyleDeclaration To Set Button Skins?

Feb 9, 2010

I am trying to load an swf file which has button skins as images (In the library of the swf file i have given export properties which is 'TickMark') and set the skin of a flex button using StyleManager.setStyleDeclaration.I am getting errors like 'Argument count mismatch on TickMark(). Expected 2, got 0.'This is what i am trying to do:

private function init():void
{
loader = new Loader();[code].....

If I use the class GraphicClass in setStyleDeclaration, it works... but basically I want it dynamically.Or there are other easy methods to skin (image) a flex button dynamically?

View 2 Replies

Flex :: Difference B/w Skins And CSS Themes In Flash Builder

May 14, 2010

1- why we need skins for every elements if we can style our application using CSS file. for example in theme Graphite in SDK's Sample consists of both CSS+.fla and skins---.mxml files.

2- How we can create a whole theme with out coding CSS.

View 1 Replies

Flex :: Set The Gradient Background Color For Panel Via Skins?

Jun 10, 2010

I am trying to set the gradient background color for my panel via skins. I try to change my code but nothing seems to change. Not sure what to do.

My skin file

/<!-- layer 2: background fill --/>
<!--- Defines the appearance of the PanelSkin class's background. -->
<s:Rect id="background" left="1" top="1" right="1" bottom="1">

[Code]....

View 3 Replies

Flex :: Use FXG Or Bitmap Images To Create Custom Skins?

Sep 6, 2010

I need to create a lot of custom Flex 4 skins, in most of the examples I found on the web people use FXG in order to create the skins but if a lot of the icons I use are not resizeable should I still use FXG or better use just plain old bitmap images (jpg. png)?

View 1 Replies

Flex :: Spark Skins : Blue Drop Shadow On Focus?

May 26, 2010

I'm currently experimenting flex 4 skinning. I successfully skinned most of the components i need for my application, but i can't find a way to avoid this damn blue drop shadow which is displayed when u'r focused on a textfield or a combobox.

View 1 Replies







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