Actionscript 3 :: Updating View Spark.components.List?

Sep 23, 2010

I am using a List component inside an itemRenderer. The main user interaction involves dragging an item from the List in one renderer and dropping it in another. My problem: When the data object is updated I want the Lists' height to be modified according to the number of objects in the dataprovider(dp), which is passed to the List from the data object. Now I have tried to invalidate the display of the List, refresh its dp and have tried putting this line assets.length > 0 ? assetList.percentHeight = 100 : assetList.height = 10; in other event handlers, such as dragdrop handlers, collection event handlers for the dp etc. I have also tried refreshing the dp for the List component that is using this renderer. The view does eventually get updated but only if I resize the list, or use the scroller or when I begin dragging a new List item but never after the drop.

[Code]...

View 1 Replies


Similar Posts:


Flex :: Spark List Not Updating - Missing Items

Apr 4, 2011

I have a Spark.List with several items ("folders") each containing an ArrayList of files inside, when I select one of these "folders" it should display the list of "files" on another Spark.List. Its working right now by doing this:
private function onFolderChange (event:*):void {
var list:List = event.currentTarget as List;
if (list.selectedIndex != -1) {
currentFolder = null;
currentFolder = list.selectedItem;
fileListDataProvider = currentFolder.files;
fileList.selectedIndex = -1;
}}

The problem is that when the "file" thumbnails cover more then the List viewport and a scroll is needed sometimes by changing from a "folder" to another "folder" the file List loses files. For example lets say there is a "Folder 1" with 30 "files" in it (10 visible and 20 hidden by the scroller) and "Folder 2" has 5 "files" (all visible), if I switch back and forth between "folders" sometimes it will display everything right. Sometimes it will display a scroll on "Folder 2" when there is no need and sometimes it will only display a few (5 or 10) "files" in "Folder 1" even though it has 30. Something is wrong with the fileList, its updating its items but not really updating well. I've tried setting the itemRenderer to null and reapplying, setting the dataProvider to null and reapplying, doing validateNow().

View 1 Replies

Flex :: List - Data In Components Spark In A ItemRenderer?

Apr 25, 2011

I need to create a slideshow using data received from another view.I'm calling the slideshow's view like this:

<s:List id = "list" dataProvider = "{actions}"
change = "navigator.pushView (DetailsProduct, list.selectedItem) ">
<s:itemRenderer>

[code].....

View 1 Replies

Flex :: Unable To Select Item In Spark.components.List After De-selection

Dec 21, 2010

I have a spark List defined as:

<s:List id="symbolList" dataProvider="{symbolListCollection}" change="symbolNameChangeHandler(event)"></s:List>

With the change handler defined like this:

protected function symbolNameChangeHandler(event:IndexChangeEvent):void {
symbolList.validateProperties();
changeSymbolView(symbolList.selectedItem);
}

and symbolListCollection as an ArrayList filled with Strings.

At first, the change event works fine, and I get what I expect.

However, if I Ctrl-click on the selected item, to de-select it, i am unable to ever select an item again.

When I click on something to try to select it, the change event DOES fire, however, the ItemChangeEvent has both oldIndex and newIndex set to -1

View 1 Replies

Flex :: Detect Mouse Click On Spark.components.List Items But Ignore Arrow Keys

Sep 8, 2011

I have a custom component, containing a List displaying items from an XMLListCollection:

[Code]....

Also if I click twice, only 1 mouse click will cause my custom event to be dispatched (because obviously there is no change between the items). how to make my List only react to mouse clicks? UPDATE: Yes, I've tried using "change" event for the List before, but then I have the problem that it is fired, even if the List scrollbar is clicked.

View 1 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

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 :: MX List ItemRollOver Event Equivalent On A Spark List Control?

May 26, 2011

Flex 3 List control had a itemRollOver event. Flex 4 List doesn't have it. Is there an equivalent or a workaround for this issue?

View 2 Replies

Flex :: Spark List Have Something Similar To ItemsChangeEffect In Mx List?

Jun 28, 2010

I'm trying to animate a list as I delete the top row. All the examples I can find use itemsChangeEffect to bind to the effect, but this property exists only in MX lists, not spark lists.

Any idea how I can get the same effect done in Spark Lists?

I'm trying to remove the top most item in the list with a slight fade out effect before the rest of the items move up to replace the gap.

View 2 Replies

Flex :: Events - Updating External Components From An Action?

Apr 6, 2010

I'm new to Flex and am having trouble understanding Events. I think Events are what I want to use for my situation. I have 2 components, addUser.mxml and listUsers.mxml. I access these from a ViewStack in my main application. When I load listUsers.mxml it shows a list of current users in a datagrid via a HTTPService call. When I add a user using the form on addUser.mxml I would like the datagrid in listUsers.mxml to refresh when I return to that view to show the new user. I've tried several different things with addEventListener and dispatchEvent but can't seem to get it working. Can someone help me with this logic?

[Code]...

View 2 Replies

Actionscript 3 :: Flex Spark View-port Scrolling?

Sep 8, 2011

I face a problem while i am try to scroll up or down the content in a scroller via viewport. my MXML cod is

[Code]...

View 2 Replies

Actionscript 3 :: Refer To A Spark View Component In Code?

Nov 12, 2011

I'm building a mobile AIR app using Flash Builder 4.5. The initial view in my views package is TestHomeView.mxml. I want to refer to it in one of my .as classes elsewhere in the app, and I'm not sure how to do that.

Theoretically I should be able to add an "id" attribute to TestHomeView.mxml, but FB gives me an error: "id is not allowed on the root tag of a component". The root tag is s:view.

The reason I need to do this is that within another class I make various calculations and then need to pass an array of values to a component in my view class. So in SomeOtherActionScriptClass.as I first assemble the array, myArray, and then in that class I want to do this:

myViewComponent.viewArray = myArray;

If I'm going to do that, I also need to import the view class into the .as class, which strikes me as weird. So is there a simple way to do what I want, or do I have to dispatch a custom event which contains the array, and listen for it in the view class?

EDIT - Based on the below MVC suggestion I did the following in model:

[Bindable]
public class Model
{
private static var myModel:Model;//doesn't let me name it 'model' because

[code].....

But it is coming back null. It isn't null when I put a breakpoint in the Model class, but when I try to access it from the view class, it's null. The model itself isn't null, but that variable is.

View 2 Replies

ActionScript 3 :: Events Between Spark And Custom Components

Nov 30, 2010

We are building an interface for a game. The interface has a tabbed menu at the bottom of the screen, with each tab displaying different aspects of an object (called a node). When you click on one of these parts, it becomes the focus, and we download it's details in XML, including all it's sub-nodes and parent nodes and then update the tab display accordingly, or at least that's what we'd like to happen.

What we have:
MainInterface.mxml
<s:Application...
<fx:Script>
<![CDATA[
public var currentNode:Node = new Node();
[Code] .....

We tried adding an event listener for "selectNode" to the dashBoard:SkinnableContainer you see see above, but it didn't seem to want to take. We suspect this is because dashBoard is from a spark component and the dispatcher for "selectNode" is on of our own custom components, but we weren't sure... in any case that's what the code assist seemed to indicate as we had to write it in by hand. We're not sure how to pick up the Events in FlashBuilder 4's debugger, so we're having trouble working out where it's going wrong.

Basically, when someone clicks on the label of a child or parent node (that is displayed by the itemRenderer), we want a URLRequest sent to our website, with the url specific to the node clicked on. We then want a URLLoader listening for the return which will update public variable 'currentNode' when xmlDownloaded is called by the loader. If you could clarify how the click event should be dispatched, what should be listening for it then sending the URLRequest and where the URLLoader that is listening for the xml data to return should be that would solve our problems.

View 1 Replies

Flex :: Embedding Fonts In Mx And Spark Components

Jun 9, 2011

I'm trying to embed fonts in my app. All is mostly well but for the itemRenderers in my AdvancedDataGrid. Adobe's documentation claims that [code] however, don't mention anything for ADGs, and setting defaultDataGridItemRenderer to either FTEDataGridItemRenderer or FTEAdvancedDataGridItem Renderer doesn't seem to do the trick.

View 1 Replies

Flex :: Components - Executing A Function On Another View?

Jun 5, 2011

I have a headerbar.mxml that is displayed when user swipes_down in my app. The headerbar.mxml contains a button component I want to run an erase() in the main application window. The main application is a drawing app that contains an erase(). I just don't know how to call a function from another mxml view file. I thought it would be something like

click="{mainwindow.drawPanel.erase()}";
EDIT:
protected function onColorChange(event:List):void{

[code]......

View 1 Replies

Flex :: Air - Implement Multiple View Components?

Aug 30, 2011

I'm developing a Flex/AIR application that's growing big, and some of the components need to be seen from different points of view (i.e Admin, Staff, User, Guest). I've seen myself placing code in those components to handle what the user can and can't see. But it's becoming unmanageable as the code and the roles grow bigger. I was wondering what's the best way to implement multiple views inside the components while keeping them as reusable as possible.

What I'm doing right now:

<mx:HBox width="100%" horizontalAlign="right" visible="{_view == TS_VIEW || _view == PRJ_VIEW}"
includeInLayout="{_view == TS_VIEW || _view == PRJ_VIEW}">
<mx:Button label="Agregar" click="button1_clickHandler(event)"
enabled="{_state != ADDING_STATE &amp;&amp; !_loading &amp;&amp; _canAdd}"/>
</mx:HBox>

View 2 Replies

Flex :: Attach Camera To Spark.components.VideoDisplay?

Nov 14, 2010

I'm using Flash Builder and created a spark-application Flex project that will stream video from the local camera. If I use mx.controls.VideoDisplay; there is no problem since it has attachCamera(camera) method. But Spark's VideoDisplay component does not have that method. I know I can use mx controls inside a Spark app but I want to know:

What is the real difference between spark.components.VideoDisplay and mx.controls.VideoDisplay?How do I attach camera to spark. components.VideoDisplay?Is there any advantages if I go with spark (since it's newer to mx library)?

EDIT: In the documentation this is mentioned: "Starting with Flex 4.0, Adobe recommends that you use the spark.components.VideoPlayer class as an alternative to this class. (mx.controls.VideoDisplay)"

View 4 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

ActionScript 3.0 :: Are Spark Components Available In Flash Or Only Flex 4 (flashbuilder)

May 15, 2011

Are spark components available in flash or only flex 4 (flashbuilder)?

View 4 Replies

Flex :: Hero Spark Component - Changing View From Within Custom Itemrenderer?

Mar 22, 2011

I've made a custom list itemRenderer with 2 buttons and a label. One button deletes the list entry (and thats not the problem) the second button would change the actual view.how I can change actual view within the itemrenderer ?

View 1 Replies

Flash :: Getting Mouse Events From UIComponent Child In A Spark View Does Not Work

Nov 3, 2011

I have a custom UIComponent that is basically just this:

public class WhiteboardUIComponent extends UIComponent
{
public function WhiteboardUIComponent() {
super();

[Code]....

This is absolutely the simplest that I could make the example. The s:View is gobbling up my mouse events - if I add a handler in the MXML to the View, I get mouse events just fine. When adding a handler programmatically in my subclass' constructor, I get nothing. I thought maybe the layout was wrong, so I explicitly set the dimensions of my UIComponent and stuck it in a border just to be sure it was where it was supposed to be - same deal.

View 1 Replies

Flex :: Moving Spark.components.Application's ControlBar To Its Bottom

Sep 10, 2011

How can Application's ControlBar be moved to its bottom in Flex 4.5 ?

The Adobe doc says only:

By default, the ApplicationSkin class defines the control bar area to appear at the top of the content area of the Application container with a grey background. Create a custom skin to change the default appearance of the control bar.

So I look at spark.skins.spark.ApplicationSkin and there is a controlBarGroup (does it hold the ControlBar contents?), but I don't know how to move it from top to the bottom.

View 2 Replies

Flex :: Change The Title Bar Height Of Spark.components.Panel?

Mar 26, 2012

I'm creating a log-in box for my Flex application. However, I'm required to apply a specific design to this box that I have to change the title bar height.

The component I'm using is spark.components.Panel. I just can't find the property of this 'Panel' component to change the feature.

View 1 Replies

Flex :: Change PaddingLeft And PaddingRight Of Spark.components.Button?

Mar 27, 2012

The class 'Button' in package mx.controls has the style 'paddingLeft' and 'paddingRight'. But now I don't want to use this old Halo theme anymore, I'm moving everything to Spark.

However, I can't find these padding styles in spark.components.Button, and the documentation [URL] doesn't show that spark Button has those styles.

View 1 Replies

Flex :: Shrink The Default Spark DataGrid Row Height And Keep The Text Vertically In View?

Dec 11, 2011

In the Spark DataGrid the default row height is about 22 px. I would like to set the default row height to 18 pixels and I can do this easily enough with the rowHeight property but what happens is when the rowHeight is set to anything less than 22 px the bottom area of the text in each row is cut off. It seems that the default grid itemrenderer or grid label has a min height set to it. Since I have multiple columns and want to have shorter rows but not have the bottom of the text cut off in each row how would I do this?

View 2 Replies

Actionscript :: Spark.components.VideoDisplay And Doesn't Dispatch DoubleClick-Events

Aug 2, 2010

I stumbled upon and interesting problem concerning spark's VideoDisplay-Component. It seems that it doesn't dispatch DoubleClick-Events. For better understanding look at the following code:

[Code]....

The Click-Event works for both components. But the DoubleClick-Event is only handled by the Panel-Component.

View 1 Replies

Flex :: Create Skinnable Components In MXML Using Spark Component Architecture?

Oct 14, 2010

There are lots of examples of how to create skinnable components in AS3 using the new Spark component architecture, however I've yet to find any such examples using MXML.What I'm mainly referring to is defining the skin parts and skin states. It seems as though the SkinPart metadata is supposed to be associated with properties and as such can't be used in MXML, is this correct?

View 1 Replies

Flex :: Remove Hover / RollOver Effects Globally On Spark Components?

Oct 28, 2010

My goal is to remove all hover feedback from the UI. The motivation is for testing touch interface prototypes and not wanting users to have the queue of interactivity when the mouse hovers which they won't have with a touch interface.

I have a partial solution but it has two problems:

Requires an event handler on each component. Flickers on hover.

protected function ui_suppressHover(event:MouseEvent):void
{
var b = event.currentTarget as UIComponent;

[Code].....

View 2 Replies

Actionscript 3 :: Cancel Editing In Halo/Spark TextInput And TextArea Components?

Jun 2, 2011

In the AdvancedDataGrid component, when you are in Edit mode in a cell, you can hit the Escape key to cancel editing (i.e. return to the previous value in the cell).I had expected the same behaviour while in Edit mode in both the Halo and Spark TextInput and TextArea components, and was surprised to find out that this is not the case.I looked at the attributes of all four components to see if this is something that I need to configure, but couldn't find anything.

View 1 Replies

Flex :: Custom Component Not Updating Display List?

Jul 12, 2011

I've created a component which is basically a meter (extends skinnable container). The skin to the component contains two rectangles (background and the actual meter). This component receives an arraycollection with the following fields value, max and min(the arraycollection I am passing is Bindable). When I initialize and pass the data to be used to draw It works great (keep in mind - only works the first time). I've created a button that changes the data array and shows the current meter value. Apparently the meter's value is changing everytime I modify the ArrayCollection I've set to be used for rendering.(dont want to say "dataProvider" because it is not a Flex dataprovider, just a variable )... here is the code...

public class meter extends SkinnableContainer {
[SkinPart( required = "true" )]
public var meter:spark.primitives.Rect;

[Code]....

View 1 Replies







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