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


Similar Posts:


Flex - Invisible Components And Events?

Nov 29, 2010

I have Flex 4 application in which I have one component as top layer which displays something like tooltips, basically user sees "presentation" which explains usage and meaning of the tools "below", sliders, checkboxes, text fields etc. I made this "presentation" using sequences so first tooltip is visible, then becomes invisible, second is visible etc.

I tried to disable mouseChildren, mouseEnabled and other possible parameters which would disable those tooltips from preventing user clicking on some button or checkbox. Obviously those components which render tooltips even tough invisible, are still "clickable".

View 1 Replies

Flex :: Custom Components / Events And Scope

Apr 15, 2012

I'm trapping keyboard events on the stage and dispatching custom events through a framework (Mate, though I don't know that this is an important issue), but I'm pretty confused by the scope. The structure is:application (traps keyboard events and dispatches custom event mainPanel (receives dispatched events but mainCalendar (a child element) is null on debugging. Obviously if I try to call a public method on mainCalendar it errors out, even though it's a child of mainPanel. However, mainCalendar is NOT null IF I use FlexGlobals.topLevelApplication.mainPanel.mainCalendar. Outerdocument and parentDocument do not expose mainCalendar either, BTW mainCalendar (a custom component inside mainPanel with public methods. Creation policy is 'all' and it's visible and exists long before I trap any keystrokes at the top level)Could someone take a minute and explain why the mainCalendar is out of scope when mainPanel receives a custom event, even though mainCalendar is a child of mainPanel. Is there a better way to manage the events so I don't have to always address the component via the topLevelApplication?

View 1 Replies

Flex :: Bubbling Events Within Custom Components In Flex?

Jan 11, 2010

I am using a custom component within another custom component in a flex mxml application file.Is it possible to bubble events from an inner component to the outer component and handle events in the outer component?

View 3 Replies

Flex :: Components - Clicking On The Element Should Open Or Trigger An Action For Displaying That Particular Comment?

May 20, 2010

I'm using Flex's Advanced Datagrid for a project and need inline comments, in a similar style to Excel spreadsheet comments.A little visual indicator should indicate if a field is associated with a comment, and on clicking on the element should open or trigger an action for displaying that particular comment.

View 1 Replies

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

ActionScript 3.0 :: Calendar Class With Updating Events Based?

Dec 2, 2010

I have built a class based on a calendar script found here on this forum. I have modified the script to work in a class and expanded on the calendar by checking each day of the month against a database to see if there are events on that day. (if there is an event, the day movie clip goes to another frame to highlight said day)Everything works great.. at first glance. The first time the calendar loads, all the days are properly in place and the Event.ADDED_TO_STAGES runs correctly, highlighting the dates with events.

The problem occurs when the user changes the month. Everything again works the way it should except for the Event.ADDED_TO_STAGE. This event only runs for each day the first time the calendar is loaded.

Code:
package classes {
//import necessary classes
import flash.events.*;
import flash.display.MovieClip;

[code].....

View 2 Replies

Flex :: Dispatching Events From External Class?

Dec 21, 2011

I have a main application Planner.mxml. This view has a couple of custom components, one of which is LoginView.mxml. In LoginView.mxml I do the following:

protected function btnLoginClick(event:MouseEvent):void
{
try
{

[code]....

As you can see, when the user is successfully logged in, I want to dispatch a custom event; if not, I show an alert box. However, this event doesn't dispatch (or at least, I don't know how to listen for it).

I would like to listen for it in my main application where I can then change my viewstate to the logged-in state. However, the event never seems to get there. I listen for it by having loggedIn="loggedInHandler(event)" on my loginComponent.

View 2 Replies

Flex :: Listening To Events In Javascript Without Using External Interface?

Jul 6, 2011

I need to register events in flex and listen to them in java script. Is there any way other than using external interface.

View 1 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 :: Components - Components - Any Component With The Functionality Such As Horizontally Collapsible Window Or Panel

Aug 22, 2010

Do you know any flex component with the functionality such as horizontally collapsible window or panel I found arc90, but it folds vertically.

View 1 Replies

Flash :: Flex Dynamically Created Components Added To Custom Components

Sep 8, 2009

I am created a dynamically adding a VBox, that contains two images. Into a Custom Component that is derived from UIComponent. The problem is the Vbox that contains the two image is only a really tiny size. I would like the VBox stretch to the size of the two images. This is how I am creating the Vbox....

[Code]...

View 1 Replies

ActionScript 3.0 :: Global Events Versus Registering Components?

Jun 22, 2009

I'm building an object oriented project with liquid layout in a loose MVC framework. My controller knows when the stage is resized, and it needs a way to tell all of the display objects to rearrange themselves appropriately when the stage resizes.

Option 1 would be extending the sprite class with a class that has one additional resize() function. On initializing the class it would register itself with the controller which would then noitfy all of the assets when it detects a stage resize.

Option 2 would be building some sort of global event that any child of the stage could listen for and do its thing when the event comes through.

View 3 Replies

Actionscript 3 :: Listening To Events Down Display List In Children Components

Jun 27, 2011

I'm creating a swf, that has a parent class and a child class. The parent class has a button, that dispatches a custom event and I want the child class to list for this event, but when I dispatch the event the child class does not hear the event has been dispatched.[code]The register EventListeners() function is in the child class.I know events can bubble up the display list but how can then go down the list?

View 1 Replies

Is It Bad Design To Nest Components Inside Components Using Flex 4

Sep 15, 2010

Is it bad practice/design to nest components inside components using Flex 4? Should I simply be creating components and inserting them into my main application as below, or doesn't it matter?

<com:MyComp1>
<com:MyComp2>
<com:MyComp3>

[code]....

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

ActionScript 3.0 :: Updating External Files To The .swf

Jul 17, 2008

I have a .fla file which is pulling in a document class. Within that main class document many other classes are being called like the code attached. my question is when I make a change to a .as file such as XaMLDiplomat.as, and then republish the .fla, should those changes update to the .swf? I am not seeing the changes I made to the external .as file, so that is the reason for this post.

View 4 Replies

ActionScript 3.0 :: Updating External Data Every Second?

Sep 10, 2009

if I'm loading external data I'd just use an XML file and load it once. In this situation, the external data will be updated very periodically, and I'd like for the Flash app to grab the most recent data either on the update of the external data, or if that's not possible, every second or so.

View 4 Replies

ActionScript 1/2 :: Updating Flash Movie With External Text File?

Dec 19, 2009

I have slide text (or rolling news) on our news page in flash, it loads data from simple xml file. The problem is caching of data in every browser. It has to be flash news, and the time reader can see a new post is counted in hours, days.how to update the text when page reloads, or better - just after change in xml, without need of reloading?

View 1 Replies

Actionscript 3 :: Using Events In An External Swf To Load A New External Swf

Mar 31, 2010

I'm trying to get an external swf to load when the flv content of another external swf finishes playing.

I've only been using actiosncript 3 for about a week and I've got to this point from tutorials, so my knowledge is limited.

This is what I've got so far:

Code for External swf (with flv content):
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
motionClip.playPauseButton = player;

[Code].....

I'm starting to get an understanding of how all of this works, but it's all to new to me at the moment, so I'm sure I've approached it from the wrong angle.

View 1 Replies

Actionscript 3 :: Write An Adapter That Maps All The LinkedSetFx Events To The Expected Flex Collection Events(As3Common-collection)

Aug 25, 2010

LinkeSetFx has its own CollectionEvent, but I don't know how to map the LinkedSetFx event to mx.events.collectionEvent(I want use it in ComboBox). LinkedSetFx is in AS3Commons-collection framework.Here is the url, choose the as3commons-collections-1.0.0.zip, you'll find LinkedSetFx in srcorgas3commonscollectionsfx

View 1 Replies

ActionScript 3.0 :: Communicate With Components Of An External Swf?

Jun 30, 2008

I've got an AS3 swf that loads an AS2 swf using the Loader class. The AS2 swf has a component in it in which i need to assign a parameter to from the AS3 swf. [code]...

View 2 Replies

IDE :: Big Site, External Swf's Or Library Components?

Jan 21, 2009

I am at the start of creating a large site with many different components: Basic text areas Latest projects with images / video Blog with text, images and video Secure login area to view protected projects

What would you recommend for this type of project. Throw all assets (main text area, blog, latest project etc) and separate them into their own mc's, then call them onto the stage? Or have them all external sepearate swf's?

View 1 Replies

IDE :: CS4 External Library Path For Components?

Jun 3, 2010

I want to:

1) Place symbols on the stage manually in loaded.fla

2) Exclude these symbols from the swf because they will already be in loading.swf

So I:

1) Created a component.fla

2) Created a "comp" symbol in the fla

3) Turned that symbol into a component via Component Definition

4) Exported the comp.swz into Configuration/Components/MyComps

5) Opened up loaded.fla

6) Pulled the comp component onto the stage

7) Went to file AS settings and added Configuration/Components/MyComps to the External Library Paths

8) Compiled loaded.swf and played it

BUT the swf includes the comp component on the stage...which is NOT what I wanted. I only want the swf to work and have a reference to comp when it it loaded into loading.swf.Why haven't the classes in comp been excluded?Obviously this is a workaround for runtime shared libraries, which is unpredictable, time-wasting and generally painful. Is there a better way to retain WYSIWYG and share symbols? I don't want to do dynamic placing.

View 2 Replies

Flex - Updating An AIR Application?

Aug 6, 2011

I know there is a built-in update framework inside AIR but finding valid code samples for the latest versions proves to be hard. Some code for simple updating (assuming ActionScript 3,

View 1 Replies

Flex :: Tell When A Component (and It's Children) Are Done Updating?

May 28, 2011

I'm resizing a chart and want to take a picture of it when all the children of that chart are done updating.

For example I'm drawing some stuff on the chart after the size changes. I've tried chaining a bunch of callLater() but I'm still running into problems on slow computers.

Raising an event when the last children has executed doesn't seem to work as it might take a while to draw (hence the callLaters).

Is there a best practice to find out when something is done updating?

View 1 Replies

ActionScript 2.0 :: Using External Action Script Files?

Mar 24, 2005

How do you call functions that are located in an external .as file? I created an action script file that I have saved in the same directory as my swf. In the file I have two functions that I would like to be able to call in my swf when someone rolls over a button.
Here is my .as file (Rollover.as):

Code:
class Rollover extends MovieClip {
function Brass() { // function for loading the brass symbol sound
brass = new Sound(this);[code]....

Within my swf I have two mp3 files, brass_click.mp3 and thoup_click.mp3, and I have set their linkage properties to "export to actionscript" with their respective names. I also have a set of buttons that I would like to play the mp3 files on rollover.On my buttons I have the following code:

Code:
on(rollOver){
Brass();
}

That is about it. How come it doesn't work? I know that I am close...

View 6 Replies

Flex :: Combobox Not Updating With Bindable Data

Jan 28, 2011

My Combobox is not alway updating when I update the ArrayCollection.[code]...

the first time it updates the combobox fine and sometimes it works the 2nd, 3rd, etc time is might update the combo box. After it stops updating the combobox, it never does until I restart the app. I have verified that the ArrayCollection is updated via the debug data, it is just the combobox is not updating the display.

View 1 Replies

Mysql :: Updating From Adobe Flex Application

Apr 18, 2011

I am very new to Flex. I want to build an application that will contain many radio buttons. I want to know how to update mysql by the status of radio buttons.

View 3 Replies

Flex :: Global Variable - Updating To Current ID

Aug 10, 2011

I am trying to work with a global variable in Flex and it does not appear to be working correctly. In my default mxml file I declare the following
public var appID:int;

This variable keeps track of the session ID across my application for SQL purposes. On another mxml page I call the following code which should update the global variable to the current ID.

// Get the ID
sqlStatement.text =
"SELECT Max(id)FROM applications";
sqlStatement.execute();
var result:SQLResult;
result = sqlStatement.getResult();
FlexGlobals.topLevelApplication.appID = result.data[0];

Lastly I run a SQL Update query using the ID as a parameter. My problem is that the FlexGlobals.topLevelApplication.appID is always 0, for some reason the global variable never gets updated, I have checked to ensure that result.data[0] is correct but the value never gets passed to the global variable.

View 2 Replies







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