spark

Using Flex 4 states syntax within MX component

The majority of code in my Flex application runs within flexmdi MDIWindow which extends MX Panel. I would really like to take advantage of the new syntax for managing states in Flex 4. Is it possible to use the new syntax even though the base class is Flex MX? It seems like a lot of work to sparkify flexmdi. thanks! ...

Flex Spark TitleWindow bad redraw on dragging

Hi, I have a problem with redrawing in flex 4. I have a spark titleWindow, and if i drag it faster, it looks like it's mask is one frame late after the component. it's easily visible with 1pixel thin border, because it becomes invisible even with slower movement. You can try it here (what is not my page, but it's easier to show you h...

How can I define custom 'contentGroups' in a custom Flex 4 component?

The spark panel component for example can be written like this And its skin file will handle layout of the contentGroup, controlBarGroup, and titleDisplay. Notice, however that the contentGroup is doesn't appear in the code above and that the controlBarGroup accepts child mxml components. Now say I want to create a c...

Spark show logged in user

How do I show the username of the person logged in within a Spark View? The default MVC view engine had a Page object that you could get the info from. How would I do that in spark? I know that I could put the info into the viewdata dictionary, which is probably the best, but I don't want to have to write ViewData["User"] = myUser; ...

FLEX 4: importing html in spark with textarea TextConverter

hi to all, I have imported a Html text into textarea using Textconverter and it works well, but I have a problem I need to mark with "image not found" if and image inside into imported html isn't more online or simply don't exist, so if anybody can help me... Thanks es. var string:String = '<img src="elvis.gif" />'; ...

How to add separator between items in a Spark List control

I have a s:List where I've defined my own itemRenderer, and would like to insert a horizontal line separating items, similar to the way the mx:LinkBar works. I don't want to have a line at the top or bottom of the list, so I can't just include an upper or lower border in the itemRenderer. I was hoping the itemRenderer could be made awar...

Spark skins : blue drop shadow on focus

Hello, 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. If anyone has a hint on this. Thanks ! ...

Flex 4: How to center a component that is larger than its container?

Hi Everyone! I am using Flex 4 Spark Components for this one. I have a custom component that is larger than a certain container, and I need it to be centered in that container. Best using only MXML, styles and properties This does not work as expected: <s:BorderContainer x="300" y="300" width="200" height="200"> <s:Button label="N...

In Flex 4.. how??

http://stackoverflow.com/questions/950571/how-can-i-set-window-application-as-light-weight-in-flex-still-not-get-answe There's a solution but how to do it in flex 4 using spark? Because it says it can't find "window"... ...

Setting button width with fx:Style

I have 4 buttons, all of them have the same width. <s:Button id="btn1" width="{btnWidth}" /> <s:Button id="btn2" width="{btnWidth}" /> <s:Button id="btn3" width="{btnWidth}" /> <s:Button id="btn4" width="{btnWidth}" /> Is it possible to set their width with Style, something like this: s|Button{ width: btnWidth; } I tried it, bu...

Progress-bar (Video Preloader)

I have a spark component VideoDisplay which displays a video. I want to add a ProgressBar to it which will show load progress of the video and when the video is loaded ProgressBar to disappear. How to do that? Thanks, ...

Add icon on spark button skin

Hello all I am trying to add different icon on different buttons. I have my skin file ready but not sure if I have to create different skin class for different button. It sounds inefficient. Any suggestions? Thanks for the reply... <s:Button id="pass" width="110" height="35" fontWeight="bold" fontSize="12"...

Hiding a specifc button from ButtonBar

Hi I have a and a spark buttonbar which draws button from viewstack childrens <s:ButtonBar id="buttonsBar" dataProvider="{myVS}"/> How can i hide a specific buttonsBar' button ? Thanks ...

How can I change the state of the itemRenderer of one member of a flex 4 spark data group?

I have a "step indicator" made out of a DataGroup: <s:DataGroup id="stepNumbers" itemRenderer="stepNumberRenderer" horizontalCenter="0"> <s:layout> <s:HorizontalLayout verticalAlign="middle"/> </s:layout> </s:DataGroup> where the dataprovider is 1,2,3,4,5. The item renderer has 2 states, "normal" and "active". Within Actionscript, I...

How to use a 9-scaled SWF in Flex 4?

Hi, I have a 9-scaled swf file that i want to use as a background. I tried using it SWFLoader but it doesnt vertically scale it. Any guidance? Thanks ...

[Flex] Warning: css type selectors are not supported in components 'sparks.component.TextInput'

Hello I am trying to do a simple CSS declaration. However, I got the warning above and not sure how to solve it. I thought s|(type) should declare the style for me :(. Thanks for the reply... <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; s|TextInp...

Event Handling from a custom ItemRenderer event in a DataGroup

I have a MXML application with a DataGroup as follows: <s:DataGroup id="productSelector" dataProvider="{products}" itemRenderer="renderers.ProductLineupRenderer" > <s:layout> <s:HorizontalLayout/> </s:layout> </s:DataGroup> I want to know when items in my itemRenderer are manipula...

Is there an event for completing data-rendering in a <s:List> component ?

Say I have a component pulling remote data into its dataGroup. I'd like to call ensureIndexIsVisible as soon as the dataGroup finishes on-screen rendering. But if I do that right after the dataGroup initialization, it throws out an runtime exception. However when I put the ensureIndexIsVisible into a callLater() function then it works...

Why is a Spark TextArea tiny, when a Height and Width are set?

Here is my problem, fairly obvious: [img at bottom] The problem, as you can see, is that the text (height and width) is nothing like the Height and Width of the compoent (Spark TextArea) that I have set via the Main.mxml file in Flex 4. This is pissing me off so much because nobody can tell me why this is happening, or how to fix it. ...

Height problem with automatic word wrapping in MXTreeItemRenderer in a flex tree

With the default TreeItemrenderer it is possible to enable automatic word wrapping depending on the tree width by setting wordWrap=true and variableRowHeight="true" in the tree control. I would like to enable this behavior in a MXTreeItemRenderer (a wrapper for using spark components as mx itemrenderer). I used the MXTreeItemRenderer cr...