Flex - Label DataChange Event Not Getting Fired?
Feb 23, 2010
<mx:Label id="myLabel" dataChange="{trace('changed!!');}" />
I change the text in the above label:
myLabel.text = "new text";
But nothing is traced as it's supposed to.
Am I using a wrong event? I thought dataChange is fired when text in the label is changed.
View 1 Replies
Similar Posts:
Dec 2, 2011
I am working on Flex project these days and having java background. In my current task, same pop up is opened when two different types of custom events are being fired and I have to hide a button for one event type. So, how i can get event type.
View 2 Replies
Jul 16, 2010
I have 2 files, 1 to dispatch the event and 1 to receive it (of course in addition to the event class itself).
I've done this before with both dispatching and receiving files being mxml, but this time the dispatching file is an actionscript class, and it's not working this time. Is it different for actionscript classes?
Here's a dumbed down version
The dispatching class dispatches the event as soon as it's created.
public class ASClass extends UIComponent{
public function ASClass(){
dispatchEvent(new MyEvents(MyEvents.FIRE_EVENT));
}
}
in my main mxml app, I instantiate the ASClass which automatically dispatch the event as soon as it's created and the main mxml app should receive back.
protected function appCComplete(event:FlexEvent):void{
addEventListener(MyEvents.FIRE_EVENT, gotEvent);
var asClass:ASClass = new ASClass();
[Code].....
View 1 Replies
Feb 12, 2011
I'm (slowly) learning Flex 4 and working on skinning a custom component that extends SkinnableComponent. The component is all in ActionScript and essentially looks like this:
[Code]...
The issue I'm having is on NULL REFERENCES in the Constructor for the various SkinParts, because they're not created yet. I'm trying to find out when is the best time to access them to assign their .text values. I know I can override partAdded() and add the .text value as each part is added, but I'd rather just listen for some magic event that is dispatched when they're all available.I'm not sure whether or not it matters, but the accountName, accountNumber variables are assigned by using a repeater with a dataProvider on the host component. I'm not sure if that too has something to do with when the data is available to the AccountSummary component - which may also needed to be waited on. I was able to successfully use FlexEvent.CREATION_COMPLETE to assign all my .text values to the SkinParts, but is that the right event/best practice?
View 1 Replies
Mar 16, 2009
I want to validate the user detail screen and infrom user ifany error when he moves out of flex screen.Basically we have submit button out of flex area and userenters detals in flex screen and submits using jsp header
View 1 Replies
Aug 19, 2011
<s:ViewNavigator id="trends" label="Trends" width="100%" height="100%" firstView="views.TrendsView" icon="@Embed('assets/column-chart-icon32.png')"/>
<s:ViewNavigator id="attach" label="Attach" width="100%" height="100%" firstView="views.AttachView" icon="@Embed('assets/paperclip-icon32.png')"/>
Now, I know if you click on "trends" then firstView "views.TrendsView" will be shown. Now you are in that view and click again on "trends" (bottom nav bar) which event will flex dispatch?
View 3 Replies
Oct 12, 2009
Using flex builder with flex sdk 3.4.0 if the module is remote like url...The READY event is never fired, i don't understand why.Do you get the same behavior? Original code is from url...[code]
View 3 Replies
Feb 26, 2011
Which event is fired after the data is loaded into datagrid or combobox ? (Assuming the dataprovider is set to the datagrid).
View 1 Replies
Mar 19, 2011
I've just been working on a splash page/main menu for my game, and when tracing a value in the function fired when added to stage, I noticed it was tracing twice.After a process of elimination I found it was caused by some text inside a movieclip in the library.
This is literally my first time using MovieClips in AS3, as I generally just render everything manually, but I used one to knock up some quick text.When converting the text to vector graphics, the problem disappeared. Still the same MC being created and added, yet no problem. It was caused by the text.Doing away with MC's completely, embedding the required font and just using manual TextFields is my solution.Tested on 2 different FP10 builds by the way, same behaviour on both.
View 2 Replies
Feb 12, 2009
I've got this weird problem with Flash in a embed browser in an ASP.NET Windows Application. I've got this Flash Movie that runs in the Windows application and has got a couple of comboboxes. I've added an eventlistener to such a box, but his change event isn't triggerd on some computers. When I click on the combobox it opens up, but when I click on an item in the combobox it closes before he could trigger the change event.
The weird part is that this occurs on some computers, on others it works as it should. And when I load the swf directly in the browser the comboboxes work all the time. So it has something to do with the Windows Application and Flash. All the tested computers have the Flash plugin version 9 and higher (needed for my movie) installed.
View 0 Replies
Jan 18, 2010
i have to remove the event listener as soon as that even gets fired. i added the listners like this.
btn1ClickHandler function:
-------------------------
private function btn1ClickHandler(evt:MouseEvent):void
[code].......
View 1 Replies
Feb 2, 2010
I'm loading in a jpeg and sometimes the Event.COMPLETE is never fired. I have a ProgressEvent that traces out the bytesTotal and bytesLoaded... and it goes all the way up until the bytesTotal equals bytesLoaded... but randomly, the Event.COMPLETE is never fired!
View 3 Replies
Sep 15, 2010
ok this seems to look like it should work.. but for some reason the Event.COMPLETE listener for the loader is not getting fired..
does anyone see something that I missed..
i put in trace statements in to see where its not getting to..
I verified this so far..
- the constructor function does appear to add the even listener to the loader.
- Unit3DPreview.load() function gets called (from the parent class) and receives the _path string properly..
- the loader does have an Event.COMPLETE listener at the time of the loader.load() call..
- the renderAnimation listener function never gets fired off.. even though the listener has been added..
there is no IO error.. the image is in the correct location.. I know this because if I remove it .. I get an IO error..
one thing is that there is an instance of this class already placed inside a library symbol that is associated to another class that passes a bunch of data .. the preview image path being one part of it.
not sure if having it be already existing vs me creating it via code would make a difference .. that is something I have not tried yet.
[Code].....
View 1 Replies
Aug 6, 2010
I just would like to know how can I dynamically change a label's values while on mousedown.I basically have a mousedown event and I also have two labels in my application. What I would like to happen is to get the current x and y position of my mouse pointer as I move my mouse through the screen and changing the values of the labels into the values of the current x and y coordinates of the mouse pointer.
protected function object_mouseDownHandler(event:MouseEvent):void
{
curX = this.mouseX;[code]........
However, what this code does is that it records the coordinates of my mouse as it moves across the screen. What i want now to do is just to get the coordinates of the mouse while event is on mouseDown. What i'm thinking is to call the mouseDown event and ask it if the mouse is currently down, if it returns true, then i'll start recording.
View 2 Replies
Mar 11, 2011
I have the following codes,
for (i=0; i<answerArray.length; i++) {
var myOptionButton1:spark.components.RadioButton = new spark.components.RadioButton();
myOptionButton1.label = answerArray.getItemAt(i).Answer_Choice;
[code].....
View 2 Replies
Jun 12, 2009
I have created a linkbar with two labels. Now, I need to keep a track of the label clicks.i.e. If in the beginning "First" is clicked, the details will be displayed. After that, if without submitting the details, "Second" is clicked then an alert message should come to inform the user that "First is still in progress, do you want to cancel and begin Second operation". Vice-versa for Second to First transition. I need to know how to write events to keep track of which button clicked.
View 1 Replies
Feb 25, 2010
So let's say we want to load some XML -
var xmlURL:String = 'content.xml';
var xmlURLRequest:URLRequest = new URLRequest(xmlURL);
var xmlURLLoader:URLLoader = new URLLoader(xmlURLRequest);
[Code]....
I hate that you can't just say e.target.src or whatever - is there a good way to associate URLLoaders with the URL they loaded data from?
View 3 Replies
Mar 19, 2011
I have an AS3 movieclip with a button. Both the movieclip and button needs a click event but when I click the button it also fires the parent movieclip's event handler.
View 1 Replies
Nov 21, 2011
Using FlashDevelop, I've got a bit of code to detect keyboard events. The problem is, if I run this code from the main class (Main.as) it'll trigger the event, but not if I go to another class.
For instance, I have the main class, and it has this function
addEventListener(KeyboardEvent.KEY_DOWN,onKeyDown);
public function onKeyDown(e:KeyboardEvent):void
{
[Code]....
There's no message from either class. If I put the event in the second class, nothing happens. All the other events besides keyboard events still work.
View 1 Replies
Jul 5, 2009
when I double click, the event doesn't get fired,[code]
View 2 Replies
Jan 19, 2010
the issue i face right now is that there is an item that can be dragged around the screen and if this item is dropped, physics will bring it back to the floor. all good so far. however, when i am currently dragging the item and i right click and choose "show redraw regions" or any other option available in that menu, there is no mouse up event fired, making it impossible for me to simulate the release of the item. i have looked in the googles and the doc:
[Code]...
View 2 Replies
Aug 19, 2009
I have a Custom Event that takes the name of a file uploaded through FileReference and bubbles the variable back up to the parent class. The Custom Event works and when traced in the parent class, it appears the variable came through as well and traces out in the output. However when trying to use this variable in the text field and assigning it anywhere in the parent class, nothing happens, not even an error.[code]
View 3 Replies
Apr 28, 2011
What is the event that gets fired when you click on a datagrid column to sort it? I could use that to know which column is getting sorted and hence have a common sortcomparefunction for all columns.
View 2 Replies
Aug 20, 2009
I have a Custom Event that takes the name of a file uploaded through FileReference and bubbles the variable back up to the parent class. The Custom Event works and when traced in the parent class, it appears the variable came through as well and traces out in the output. However when trying to use this variable in the text field and assigning it anywhere in the parent class, nothing happens, not even an error.
parent class
____________
package classes {
import classes.gs.*;[code]..........
View 0 Replies
Apr 18, 2011
I am trying to make an application which will do the video conferencing. I have read some article on actionscript and started making the application. I am capturing image from web cam and copy it in an array which acts as a buffer. Then I am running a timer which pops each image from array and converting it into bytearray and send it via socket. When timer event is fired camera gets blocked and the whole process gets slow down. Is there anyway to do the video conferencing smoothly ?
View 2 Replies
Jun 15, 2010
is there any way to know which method caused a certain event to be fired? For example, in NetConnection API, you can have: connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); netStatusHandler is called everytime a Flash Remoting call fails for some reason: how to know which one failed?
View 2 Replies
Jul 12, 2010
I am having trouble wiring up an event listener to a fl.transitions.Transition.
Is it possible to somehow view all the events an object fires? That way I could check I am using the correct event (and possible view better ones to use).
View 7 Replies
Nov 18, 2010
I have a rollOver event on a pop-up button in flex. I want that the menu is opened on rollover. But if the user accidentally goes with the mouse over the component the menu should not be displayed. So on rollOver I want to start a timer (wait for half second) and than check if the user is still on the pop-up button (rollOut was not fired).
My example code so far:
private function rollOverMenu(event:Event){
rollOutNow = false;
var shortDelay:Timer = new Timer(3000);
[code]...
The Alert "time is up" is never shown, any ideas why my timer event does not work?
View 2 Replies
Jan 22, 2012
I am trying to send a simple HTTP message from Flex to C# server, but it seems that I am getting tow calls, first is the real one and the second is an empty one.
Why is that and how can I handle it?
This is my C# code:
TcpListener listener = new TcpListener(IPAddress.Any, 9400);
listener.Start();
Console.WriteLine("Server started");
[Code].....
I been trying to send a true HTTP response a notice another thing, the second call is coming without waiting for the first call, if I am putting the response thread to short sleep(100 milliseconds in my test) then I am getting the second call before I been able to response for the first one.
View 3 Replies
Nov 2, 2010
I want to persist the AdvancedDataGrid column order for the user if they move them around and close the window or log out. I have code (see below) that works when I place the code in a grid parent container - eg, a title window. I'd like to generalise the functionality by placing the code in an AdvancedDatagrid subclass rather than each grid container so that all my grids have access to a single location when saving/loading their choices. My approach is to store the datafield names and grid name in an array and save/read to/from the shared object. and update the column order based on that order. The invaldation fails when I use the code in the Advanced Datagrid subclass but works fine in the grid parent.
private function loadSettings(name:String = "custom"):void
{
var gridName:String = this.stripUIDNumbers(this.uid);
var temp:Array = new Array;
[Code].....
View 1 Replies