Flex :: Go From A Spark.LinearGradient To BeginGradientFill

Apr 26, 2011

I'm trying to translate this LinearGradient

<s:LinearGradient rotation="90" scaleX="44.2931" x="10.294" y="-0.276" >
<s:GradientEntry color="#FFD500" ratio="0"/>
<s:GradientEntry color="#F5A106" ratio="1"/>
</s:LinearGradient>

into an equivalent beginGradientFill call. My best guess of the translation is this

var matr:Matrix = new Matrix();
matr.createGradientBox(20, 20, Math.PI/2, 10.294, -0.276);
g.beginGradientFill(GradientType.LINEAR, [0xFFD500, 0xF5A106], [1,1], [0,1], matr);

but I'm not sure if this is right, nor I know what the size of the box should be (the two 20s in the code above are just me trying stuff). Would love any expert expert opinions!

View 1 Replies


Similar Posts:


Flex :: Instead Of A LinearGradient Fill Only The Last GradientEntry Is Displayed?

Mar 15, 2011

I have a Rect with the following fill:

<s:LinearGradient id="goldGradientFill">
<s:entries>
<s:GradientEntry color="#6B4822" ratio="0" />

[code]....

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.0 :: BeginGradientFill For A Vertical Shadow

Jan 15, 2010

I'm having problems creating a vertical shadow using beginGradientFill. Basically, I'm just trying to put a verical shadow on my player controls. The horizontal shading looks great, but then why I try to move to the vertical it just goes grey (when I'm using a combination of white and black).

[Code]...

View 1 Replies

ActionScript 2.0 :: BeginGradientFill Dynamic Color Array

Mar 19, 2007

I am using actionscript to create a gradient fill which works beautifully until I try to load the colour variables from an XML. The variables load successfully, when I trace the dynamic variables they show whats in the XML file (0xf6e3ba, 0xe9c98d) but the gradient appears white to black. When I use the HEX colour values in the code directly (the gradient works) but the trace returns (15321485, 16180154). If I use these values in the XML file I still get white to black.

View 3 Replies

ActionScript 3.0 :: BeginGradientFill Requires A Matrix As Its Parameter

Oct 21, 2010

[code]...

The problem I'm facing is that the matrix variable. Above its like an object. But in AS3 the beginGradientFill requires a matrix as its parameter.

View 2 Replies

ActionScript 3.0 :: Spark Scroller, Switch Focus To Spark View But It Still Scrolls

Jan 26, 2012

I am working on a drag and drop feature for the sparkScroller. This is sort of how my layout looks:
 
<mx:Canvas>
<s:Scroller id="items" .. />
<mx:Box id="dummyRow" visible="false" />
<s:View id="touchView" visible="false" />
</mx:Canvas>
 
So when you hold your finger over a row in the items Scroller for more than a 30 seconds, the touchView becomes visible so does the dummyRow. The dummyRow gets populated to look like the row which you held your finger over.
 
So the touchView has the event handlers for moving your fingers and places the dummyRow where your finger is. The problem I am having is even though the touchView is reacting to my move events, the scroller still keeps reacting to my move events as well even though it's a sub layer. Because I started on the scroller it still keeps track!
 
How can I remove focus / tracking from the scroller?

View 1 Replies

Flex :: 4 - Scroll Flex Spark Datagroup To Maximum Amount Programmatically

Jul 6, 2011

I have a spark skinnable component which contains a datagroup with images. The datagroup is scrolled by hovering the mouse over it. Everything works fine except one thing: after I change the datagroup provider, I need to scroll down automatically. The problem is the images are not loaded immediately after I set the provider so (contentHeight - height) does not yet represent the actual maximum scrolling position. Is there an easy way of telling the datagroup to scroll down as its content loads? Because the workaround seems to be not so straightforward. This is the code for scrolling(thumbnailStrip is my datagroup):

[Code]...

View 1 Replies

Flex :: Unable To Set Font Family Style To Spark Button In Flex 4.6?

Feb 28, 2012

I have created a style in which i am defining a font family.When i apply this style to label it reflects the font were as there is no change when it is applied to a spark button.I Tried various way to Apply font style but it doesn't work.Other properties work fine except font family. Even i tried creating skin class and set the font family style of label in it. While previewing the skin i can see the changes but when i apply it to buttonApproach 1

@font-face{
src:url("HARNGTON.TTF");
fontFamily: MyF;

[code].......

View 2 Replies

Flex :: Datagrid - Display A Multi-line Column Header Using The Flex Spark Data Grid?

Apr 13, 2011

How can you display a multi-line column header using the Flex Spark Data Grid for Flex 4.5?

View 5 Replies

Flex :: Make Flex Spark Label To Be Auto - Resized?

Mar 11, 2011

I'm creating the Label component like this

var label:Label = new Label();
label.text = "some text";
label.styleName = "someStyle";
addChild(label);

But it stay invisible until I explicit set the width and height.How can I make the label to be auto resized according to it's text?

View 3 Replies

Actionscript 3 :: Flex - Flex 4.5 Simple Spark Button Skinning ?

Jun 25, 2011

Anyone missed the old simple method for skinning a simple button?

CODE:

The problem im having is that, this method of creating a simple button with skin is being phased out : Infact it is no longer supported in flex 4.5 mobile projects.

So the question: Is there a simple way to perform this, with spark buttons (which is suppose to be the new way to go). As simple as possible.

Basically i only need a button with 2 images : down/over & up. And i want to keep the code as simple as possible : The new skinning methods, seems to really adds way too much lines for something that used to be as simple as the example above.

View 3 Replies

Flex :: Print Flex Spark Datagrid By Using The Mx PrintDataGrid?

Oct 4, 2011

Flex 4.5+ is I guess everyone is working on nowadays so I asked this question since I haven't yet find working both spark datagrid and the mx printdatagrid components together.
What I'm trying to achieve is to print all the data inside my spark datagrid. So when I do my research, we use the PrintJob or the FlexPrintJob classes.It works fine but when I need to print multiple pages since the data on my spark datagrid is quite long, I can't somehow find a way how to do it.The print output is only upto where the height of my spark datagrid.So in my research, they somehow managed it to use the mx:PrintDataGrid component.But sad to say, they did it with an mx:DataGrid also.how to use the mx:PrintDataGrid along with s:DataGrid.

var printJob:PrintJob = new PrintJob();
if (printJob.start())
{[code]....

If converting a spark datagrid columns to the mx datagrid columns is not possible, is there a way that I can print all the data on the spark datagrid using multiple pages?

View 1 Replies

Flex :: Flex - Disable Spark Tab And Bar Tabs?

Nov 10, 2011

I have been able to disable tabs in a tab bar using the following tutorial.

[URL]

This only works for mx tabbar. Does anyone know how to do this for a spark tabbar? I prefer the lnf of the spark one. When I try it with a spark tab bar it just disables the viewstack of the tab and not the actual tab. An alternative solution may just be to make the mx tab bar look like a spark toolbar with the rounded edges.

View 1 Replies

Downsides To Using Spark Over Halo In Flex?

Aug 20, 2010

Is there more work, or source code files required to customize your look and feel (skins)?

How maintainable and readable is Spark relative to Halo?

Is it more productive and easier to customize overall than Halo, about the same, less?

If you're an SDK user who was 99% happy with Halo's appearance (maybe just a few CSS tweaks), is switching to Spark creating more work for you? Do we now need to employ designers to get a reasonably complete look and feel?

View 2 Replies

Flex :: Spark Label Be Skinned?

Aug 22, 2010

I would like to add some fancy drawing beyond the CSS formatting. How can I put a skin on a spark Label ?

View 1 Replies

Flex :: Spark ComboBox Click

Oct 19, 2010

I'm using a spark combobox in my AdvancedDataGrid, as an itemEditor. At some point I noticed that clicking on the scroll bar arrows would close the CB - very annoying. After much research I found this on Stackoverflow which completely solved my problems - One more and last lingering issue left though: when selecting an item from an open dropdownlist the mouse click seems to propagate to the cell below once the dropdown has closed. I assumed that the fix above would take care of this last issue, but it doesn't seem to. I tried to override the item_mouseDownHandler for the CB and stopImmediatePropagation() of the mouse event post its usual behavior, but that also seems to have no effect. I also tried setting the mouseChildren property for the skin['dropDown'] to false, but that impairs the whole functionality.

View 1 Replies

Flex - Footer In Spark Application?

Oct 23, 2010

I'd love to be able to setup a footer at the bottom of my spark application, which runs in a browser. I was reading through the documentation of Application and the awesome Adobe examples. Unfortunately I keep getting lost when the documentation talks about how to position the control bar area at the bottom via spark.skins.spark.ApplicationSkin - sadly I'm not sure what that means from a practical standpoint and am stuck. How exactly do I set this up? Do I need to create an application skin (doesn't seem to be an option for the MXML skins) and apply it to the skin? Or instantiate ApplicationSkin and do something with it (what, exactly)?

Sorry, I'm sure this offensively simple, but I can't find any obvious example anywhere.

View 1 Replies

Flex :: Spark Tab Bar Rollover Index?

Mar 13, 2011

I am using a the spark tabbar and gave a view stack as dataprovider.....in the view stack there are n elements ...and each element has a panel....my code would be some thing like this....

<s:tabbar dataprovider = {viewstck-id} height="100%" width="100%"/>
<viewstack id="viewstck-id">
<navigatorContent >

[code]....

View 1 Replies

Flex 4 Spark Blur Filter?

Jun 18, 2011

I'm trying to create my own modal window (the built in popup manager won't work for this application) and get objects behind the window to be blurred. The code below is obviously wrong since it doesn't work but can someone point me in the right direction? Do I have to manually blur each object behind the window?

[Code]...

View 1 Replies

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

Flex :: Width Of Spark Label?

Aug 5, 2011

I need to set the text of a spark label and then position such label along the x axis depending on its width. Unfortunately, it seems that the width of the label does not update right away and thus the positioning will fail. I can listen to updateComplete events on the label and update its position then, but that means repositioning the label a lot more often than I would like (updateComplete fires off a lot more often than upon changing width). how to properly handle what would appear to be a trivial task?

Here's a code snippet that shows what I described above. If you press the button you will see 3 traces: the label width before changing its text, right after setting its text, and when the label is done updating itself. Would love to know if there's a way to get the correct width without having to listen to updateComplete events... The button and the VGroups are just there to run the example

<?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 5 Replies

Flex :: Spark List With Buttons

Aug 25, 2011

I have a Spark List with a data provider consisting of a list of filled out form applications. What is the best way to add a button to each List Item (form application)? This button will be named Open and will navigate to the specified form application.

View 2 Replies

Flex :: Hiding A Tab In A Spark TabBar?

Feb 3, 2012

I have a spark TabBar and I want to hide and show some elements of it from an external user input (namely a checkbox check)

I am having trouble changing the tabs visibility. They are currently always shown.

I have seen a getTabAt on the mx TabBar but the look of the tab is important and the requirement is for it to look like a tab bar rather than a button bar.

My code for the tabs and for hiding and showing is below:

<fx:Script>
<![CDATA[
import mx.containers.VBox;
import mx.controls.Label;

[Code].....

View 1 Replies

Flex :: Spark Percent Height Not Working?

Feb 24, 2010

First of all I know there is a spark VolumeBar component but, for design requirements I can't use it..

I'm trying to create a custom component but heights are not responding as should. [Update] This is were I call the class

<components:VolumeSlider steps="4" height="100" /> The problem is that the volume slider is adapting perfectly, but My custom items component doesn't.

[Code]...

View 1 Replies

Flex :: Adobe - Take Screenshots Of A Spark VideoDisplay?

Mar 2, 2010

I want to build a component, where the user can play a video in a Flex Spark VideoDisplay. There will be a button and whenever the button is pressed, I want to save the current time of the VideoDisplay plus a screenshot. The screenshot needs to be someway saved, because I want to display all times and screenshots in a DataGrid (screenshots should appear when the user hovers a time in the DataGrid). So, how can I take screenshots of the Spark VideoDisplay and save/display them?

View 2 Replies

Flex :: GetCharIndexAtPoint() Equivalent In Spark RichEditableText?

Mar 25, 2010

I want to find a way to get the character index in a Spark based RichEditableText based on mouse x, y position.The mx.controls.TextArea has a protected getCharIndexAtPoint() method but I can't find an equivalent of this in the Spark RichEditableText which is disappointing.

View 3 Replies

Flex :: Enumerating Spark List Items?

Mar 31, 2010

How to enumerate items of Spark List component after setting dataProvider property?

I mean accessing them as DisplayObject instances.

View 1 Replies

Flex :: Make Sure That There Is Always Something Selected In A Spark List?

Apr 29, 2010

I have a spark list, which is based on a dataProvider. As the application runs, the data in the dataprovider can change, and also the dataProvider can be swapped for a different one

What I need to do is make sure that something is always selected in the list (unless it is empty)

View 1 Replies







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