Flex :: Extending The Spark Skin?

Jul 14, 2011

My current requirement: I have menubar with 3 different button types. Skin structure is simple: one label and two state graphics. So my base skin have label, and in overridden i want add two images. But flex docs states that overriding of skin is not preferred. I try override override public function addElementAt(element:IVisualElement, index:int):IVisualElement for adding new subcomponents to custom container sdk using it but my view is blank. Does skins are really not overridable? My current code:

<s:ButtonBar skinClass="MenuSkin" dataProvider="{content}" />
in MenuSkin:
...
<fx:Component id="firstButton">

[code]....

and next 2 skins have repeated <s:Label/> part. As label should look the same, naturally i want extend base skin class but it is no possible form me. First problem: if i add image in mxml it overlaps label.

View 1 Replies


Similar Posts:


Flex :: Add Icon On Spark Button Skin?

Jun 11, 2010

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.

<s:Button id="pass"
width="110"
height="35"

[Code]....

View 2 Replies

Flex :: Conflicts Between SWC Skin And Spark Drawing API

Aug 4, 2010

I have a project where we are trying to skin Spark components from a third party library that are built up from the drawing API primitives. Our first attempt involved creating a Flex skin (SWC) in Illustrator/Flash and applying that skin to the Spark components via CSS. We found that even with only a single instance of one of the components skinned in this way on stage, the application was brought to it's knees. For example, it failed to respond in repaint scenarios in a timely manner, and exhibited all the symptoms of being hung.

Our next approach will be to recreate the same skin artifacts in MXML classes that are in turn associated with the third-party components. Although the complexity of some of the skins leads me to believe that we might not avoid performance problems with this approach either. My question is the following: Is there a correct or recommended way to apply either a SWC or based skin to a component that is built up from the Spark drawing API to begin with? Even as I ask the question I recognize that the approach means using the Spark drawing API in two places and will probably have unexpected consequences.

View 1 Replies

Flex :: Keep 'down' State For Spark Skin Button?

Oct 20, 2010

I have spark skin a button with up, down, over, and disable states in a button component to create a modular. Is there a way when the user press and hold a key, the button will remain in 'down' state?

The button component include skinclass:

<?xml version="1.0" encoding="utf-8"?>
<s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code].....

View 1 Replies

Flex :: Exposing Properties To A Spark Skin Class

Sep 2, 2011

I am having trouble wrapping my head around the spark skin class in relation to it's host component. Basically, from what I've seen with most every skin that comes in the Flex 4 framework they don't directly expose the properties that are dynamically being set in the host component. Instead, they define states that get exposed to the skin class to define when a component should look different. This is all fine and dandy when you have a very simple component with a standard set of states, but when you have twenty different properties (hypothetically) to set in your host component that should change how the skin looks it could get very complicated very fast.

The way that I've seen that they have used to get around this is by overriding the commitproperties and invalidate functions in the skin class, grabbing the values for the properties they want from there, and then setting them to a locally instantiated variable inside the skin class. This is fine, but I feel like that is just a patch workaround to it which makes things a lot more complicated than it needs to be.Is there any way to directly expose a bindable property from the host component class so when you define your skin class it is directly ready to be read from? Let's say you have custom button with a boolean property of 'selected'. In the skin class, you want to add in a get and set function for the property 'selected' so you can perform some action upon your skin whenever it's set. How do you tell the skin class that this is an available property for you to work with from the host component?

View 2 Replies

Flex :: Skin A (single) Spark Component To Look Like An MX Components

Oct 12, 2011

I want to use a Spark ComboBox with numerous MX Components but the Spark ComboBox does not look the same as the MX Components. Is there a skin I can use to Skin Spark components like MX components?

[Code]...

View 1 Replies

Flex :: Way To Set Scrollbar Skin Globally In Spark Application?

Dec 21, 2011

I have a custom skin class that I want to apply to all scrollbars. Is there a way to set this globally in a Flex Spark application?

View 3 Replies

Flex :: Layout - Get Spark Skin To Center Vertically?

Apr 2, 2012

I've created a skin that allows me to have two labels on a spark button, but the button text won't center vertically. It stays at the top of the button no matter what settings I give it. The icon in the skin DOES however, center vertically. This is the skin:

[Code]...

View 2 Replies

Flex :: Copy/modify The Spark Skin For The Default Button?

Jun 20, 2010

I'm trying to copy/modify the spark skin for the default button, but not sure how to find that skin. When I hover over <s:Button and Ctrl + Click it, it takes me to the Button class, but there isn't any skin information there.

View 1 Replies

Actionscript 3 :: Extending Spark TextInput To Auto-resize?

Apr 20, 2010

have a Spark TextInput control but I haven't figured out a way to make is auto-resize...Does anyone have any code to get started?

View 1 Replies

Actionscript 3 :: Where Is Spark Skin Button Size Set

Dec 10, 2011

I've skinned an hSlider's thumb with an image. But the image is pixelated, as though it's been forced to resize.It's just a pretty circle with a radius of 30 px.The other thing that happens is that instead of the new button being cleanly bisected by the track, it is just below the track, tangential to it. So now I have to reposition it by modifying its y value in SliderThumbSkin.mxml? And (presumably because its registration point is at upper left) when I slide it all the way to the right, it goes right off the end of the track until its left edge is at the track's right edge. This might also mess up calculations for the hSlider.value property.

You'd think you could just apply the skin and it would replace the button, but seems that both its position and size are being wrongly manipulated.Is the thumb's size automatically reset or resized somewhere? Is there a way to do this correctly and cleanly?

EDIT: Here's code for the entire test project:

//HSliderTest.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"[code]......

View 1 Replies

Flash :: AddElement To TopGroup Of A Spark Panel Component Skin?

Apr 16, 2011

How do I addElement() to the topGroup of a Spark Panel component skin?For instance, if I create a custom UIComponent, then create an associative skin that uses the Spark Panel as a default, how do I add elements to the topGroup from within the skin?

View 1 Replies

Flex :: Define A Control And A Skin Which Can Be Reused With Different Controls Inserted From Outside The Skin?

Mar 15, 2011

SkinParts are a great way to add event handlers and logic to an object that is instantiated in the skin, away from any business code. Often, though, I find myself wanting to do the opposite, and define parts that will be used in reusable, skinnable containers in the parent mxml files which will be inserted into the skinned containers.

What's the best practice for when you want to be able to define a control and a skin which can be reused with different controls inserted from outside the skin? Edit: A better way to put this might be that I want to use something that works a little bit like a SkinnableContainer, but that isn't limited to one area where content can be placed.

View 1 Replies

Flex :: Mobile Skin Overriding HostComponent Of Parent Skin?

Feb 10, 2012

I extend Button to create ImageButton, and I extend ButtonSkin to create ImageButtonSkin. But, when I define hostComponent like this:

public var hostComponent:ImageButton

I get an error that there is a conflict with hostComponent:ButtonBase inside the ButttonSkinBase. How do I extend a skin AND provide a new hostComponent for it?

View 1 Replies

Flex :: Use SWF Symbol As Up,down,up Etc Skin In Skin File?

May 14, 2010

How can we embed the over,up,down etc skins defined as sybols in a .swf file... i mean in skin file how can i specify those symbols to be used as up,over,down skins.

View 1 Replies

Actionscript 3 :: Spark Images In Spark List With TileLayout Disappear On Scroll And Drag In Flex App

Jul 1, 2011

I have a renderer that looks like this:

[Code]...

Loading thumbnails using this method works perfectly. The issue happens when you scroll the List.

View 1 Replies

Flex :: 4 - Add Component To Title Bar Of Spark Panel Or Spark TitleWindow

Feb 7, 2011

I'm looking to add a couple of buttons to the title bar of a Spark Panel or Spark TitleWindow. Is this possible to do without making the panel from scratch?

View 1 Replies

Actionscript 3 :: Hide Video Skin When Playing, Otherwise Show Skin?

Jun 10, 2011

I'm using the default CS4 FLVPlayback skin, mainly the SkinOverPlayMute.swf. I know there's a skinAutoHide option, but because I don't want it to auto play, I want people to see a play button when they first encounter the video (so they don't think it's just an image). But the skin needs to hide when the video is actually playing (so the video doesn't get blocked by the controls).

In other works - when video isn't playing: skin showing; when video is playing: skin hide.

View 1 Replies

Flex :: Exception When Extending A Component?

Aug 2, 2009

when extending a flex component and trying to use it, I get a RTE. I.e. I am extending a DataCanvas and am using it like this:

<MyComponent dataProvider="{dataProvider}" width="100%" height="100%" x="0" y="0" id="dc" verticalCenter="0" horizontalCenter="0" />

Has anyone seen this? How can I get around it?

[Code].....

View 1 Replies

Flex :: Error When Extending AdvancedDataGridRenderer

Mar 28, 2011

I have set the itemrenderer package like that:

[Code]...

However when I include the following lines in my AdvancedDataGridColumn tag,

[Code]...

View 1 Replies

Flex :: Extending TextItem Class But Getting Error

Jun 23, 2010

I am trying to extend the TextItem class in Flex 4 but I keep getting the following error:
Could not resolve <custom:txtIdNumber> to a component implementation.

My txtIdNumber.as is as follows
package custom {
import spark.components.TextInput;
public class txtIdNumber extends TextInput {
public function txtIdNumber(){
super();
[Code] .....

Initially I thought that I might be extending the class in the wrong way, but all the examples I found look the same.

View 1 Replies

Flex :: Extending A Class With Multiple Classes

Jul 16, 2010

I'm creating a class that extends another class.

public class ASClass extends UIComponent{
}

but I'm trying to make it extend multiple classes. Is this somehow possible? I read it may be possible through composition?

View 2 Replies

Professional :: SteelExternalAll Skin Is Not Available In Skin Menu CS3

Feb 26, 2011

My client wants SteelExternalAll as the skin for her swf. It's not on the skinning menu in CS3. Is it possible to download it somewhere?

View 2 Replies

Flex :: Extending DataGridColumn For Custom Sorting Function

Aug 25, 2009

I extended the DataGridColumn because I wanted to include a custom itemToLabel function (to be able to show nested data in the DataGrid. See this question.

Anyways, it also needs a custom sorting function. So I have written the sorting function like so:

private function mySortCompareFunction(obj1:Object, obj2:Object):int{
var currentData1:Object = obj1;
var currentData2:Object = obj2;

[Code].....

Whenever I try to sort the column, I get the error "Error: Find criteria must contain at least one sort field value."

When I debug and step through each step, I see that the first few times, the function is being called correctly, but towards the end, this error occurs.

View 4 Replies

Actionscript 3 :: Extending Flex FileReference Class To Contain Another Property

Nov 12, 2009

I want to extend the FileReference class of Flex to contain a custom property. I want to do this because AS3 doesn't let me pass arguments to functions through event listeners, which makes me feel sad, so I need this property to exist on the event target, so I can access it.I also want to be able to cast extant FileReference objects to this class without any fuss. I have:var fr:SmxFR = e.target as SmxFR and I want that to work; right now it just returns null.A blank, newly instantiated SmxFR object has the extended property in place, but all of its inherited properties and objects return Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.[code]I get living handle property from that, and all other (that is, inherited) properties throw Error #2037.So, maybe what I want to do is going to require overriding FileReferenceList? If the original objects must be instantiated to SxmFR, that's what I'll have to do, since I'm using FRL to allow the user to select multiple files at once. Are you guys sure there is no way to fast from a FileReference to my class?

View 3 Replies

Actionscript :: Flex Extending DateChooser - Events In Calendar

Mar 29, 2010

ExtendedDateChooser class is great solution for simple event calendar used in my flex project. You can find it if google for "Adding-Calendar-Event-Entries-to-the-Flex-DateChooser-Component" with a link of updated solution in comments of the post. I posted files below. Problem in that calendar is text events are missing when month is changed. Is there updateCompleted event in Actionscript just like in dateChooser flex component? Like in:

[Code]...

View 1 Replies

Flex :: Extending DataGrid Component, And Adding Buttons To It?

Feb 9, 2011

I'd like to extend the standard DataGrid component in flex with mxml. But I want to add buttons to the bottom of the component. I've tried attempting the following but its not working...Am I adding the Button to the wrong element?

<mx:DataGrid xmlns:fx = "http://ns.adobe.com/mxml/2009"
xmlns:mx = "library://ns.adobe.com/flex/mx"
xmlns:s = "library://ns.adobe.com/flex/spark">[code]............

View 2 Replies

Flex :: Extending DropDownList To Include An Extra Option?

Mar 27, 2011

I want to extend DropDownList control to include an option for creating or editing the options. For example; for a list of projects in the dropdown list, there will be another option that says "Create new project..." or "Edit projects..." and this will be the last option in the list. When user selects this option, the selectedIndex or selectedItem will not change and corresponding action will be taken (for example a popup window shows up).This will be a convenient way for the end user. Now I want this to work independent of the context and the class must be reusable. User will only specify the optionText and optionFunction to work this out. The basic structure of the class looks like this:

public class OptiveDropDownList extends DropDownList
{
private var _enableOption:Boolean;

[code].....

View 1 Replies

Flex :: MXML Error When Extending Component From TextInput

Feb 17, 2012

Whats wrong with this Flex MXML code? I'm getting error messages (error lines marked with "X"). Code is very simple but I cannot find the error.Message both times: multiple initalisation values for standard property "text" of type "string" (translated from german)[code]

View 2 Replies

Flex :: Flash Builder - Extending PopUpButton And Using It In A 4 Web Application?

Mar 16, 2012

In my Flex 4.6 web application I use mainly spark components, but there is also an mx-component - a PopUpButton extended by me (the source code is below).Users report problems with that button, but I can't reproduce any - since weeks.

I've tried replacing mx:Menu attached to it by a s:List but it hasn't changed anything. I suspect there is a "null pointer exception" or some other failure, that I don't hit when testing myself...

My question is: why does Flash Builder reports warning about my custom button as if its methods would be private or not present?

My main App.mxml:

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code]....

View 1 Replies







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