Flex :: Call A SortCompareFunction On Initialize?
Dec 3, 2009
I want to call the sortCompareFunction for a particular row when the grids first loads. Is this possible? Otherwise is there a way to call a sort method on grid load after it has been asssigned the dataprovdier has been updatad
View 2 Replies
Similar Posts:
May 28, 2010
I am trying to create a dynamic datagrid in Flex 3, I have a list of columns a list of objects which correspond to datapoints for those columns which I fetch from a url. While the grid works perfectly fine the problem is that sorting on the columns is done in lexical order.[code]...
View 1 Replies
Oct 12, 2011
I'm using a pretty standard sortCompareFunction in my DataGrid:
ActionScript Code:
protected function compare(valA:*, valB:*):int {
if(valA < valB) {
[Code]......
The trouble of course is that the compare function isn't passed any info about the column being sorted, and apparently the datagrid's click handler fires AFTER the sort is applied so that's no good either.
View 3 Replies
Sep 26, 2011
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code]....
Is that because i used both applicationComplete and Initilize together ?
View 1 Replies
Dec 2, 2009
My problem: I have a tab navigator, with many forms in each tab. But I have a single global save button.Problem is, if I don't open a Tab, it doesn't get initialized and therefore the forms it contains do not exist..
How Can I make it as if the user had clicked on every tab?
View 2 Replies
Jul 15, 2010
what the onLoad() or similar Event is in Flex? I'm trying initialize, but no joy.
[Code]....
View 2 Replies
Aug 15, 2010
How can I initialise two-dimentional typed Vector is AS3? Now I can get working only this:
private var _mainArray : Array = new Array( MyConst.DIMENTION );
public function MyArray()
{[code].....
View 1 Replies
Apr 4, 2011
I'm working with a large flex applications and I have noticed that one of our largest components (with lots of child canvases) takes about 6 seconds between the initialize and creationComplete events. I've been doing some reading and have found that having lots of nested canvases can cause slowdowns, but i'm not sure if this is where the slowdowns would be?
View 3 Replies
May 18, 2011
I have an AIR app, which keeps its settings stored on the disk.Now, when the application starts, i need to read these values from the disk file and populate the variables in my ModelLocator. My doubt is where to put this code during the App Lifecycle. I have it currently on applicationComplete. Since i am not making any updates to the UI in this code, can i move this initialization code to the 'initialize' event and thereby speed up the startup time?
View 1 Replies
Mar 7, 2011
I tried to send some services to fetch data in the creationComplete handler. Then I need to process the server raw data before displaying some sub components. Where should I put these kind of code?
View 2 Replies
May 6, 2011
i want to know what i should put befor .mx_internal
override public function initialize() : void
{
var target:DialogButtons;
var watcherSetupUtilClass:Object;
[Code]....
View 2 Replies
Dec 20, 2011
I need to completely initialize a custom component in my Flex app (i.e. I should be able to access it from action script and get its properties and its children etc), But I do not want to add it to the display or make it visible. I have tried to add it to my visible component, but keep it visible, but often many of its properties are set only when it is drawn, so i don't get what i need. Is there a way to add a custom component to some sort of 'Virtual' display, that is not visible to the user?
View 3 Replies
Oct 28, 2010
How to initialize and make condition for 2 variables in single for loop in Flex let keep i and j are two variables
View 2 Replies
Dec 17, 2010
In my flex application I use the viewstack.selectedchild() property to change the views.
When I revisit the views by the viewstack.selectedchild() property the initialize method doesnot get invoked..
View 5 Replies
Jul 5, 2011
I have quite some experience with Flex and I am just starting to write my first AIR application and would like to use as much Spark as possible here. So I started withe a simple Hello World application:
[Code].....
Unfortunately this simple example shows no child components and even none of the initialize handlers is triggered. However as soon as I change the root tag to mx:WindowedApplication everything behaves as expected: The label and the button are shown and the console shows the output of the two trace statements.
View 1 Replies
Sep 24, 2011
problem is I have a spark Tabbar, with many forms in each tab. But I have a single global save button.problem is, if I don't open a Tab,it doesn't get initialized and therefore the forms it contains do not exist..
How Can I make it as if the user had clicked on every tab?
View 1 Replies
Mar 17, 2010
I am developing a Flex application on top of Mate framework. In this application, I am using a webservice to retrieve data.As this webservice as not a fix location URL (depending on where customers installed it), I define this URL in a config file.When the Flex application starts, it first reads this config file, then I would like to use the value I found to initialize the webservice.But currently, I have no idea how to this.
[Code]...
View 3 Replies
Jan 31, 2011
I have a function in Flex which has three function in it.
public function update():void
{
A(); \Dispatches a event with Remote Call
[code].......
View 1 Replies
Jun 28, 2011
i have some actionscript that makes a
ExternalInterface.call('someFunction');
call.is it possible to reference the html object that made the call to someFunction directly using the ExternalInterface.call call?
Assume that the object that makes the call also has some Callbacks (via ExternalInterface.addCallback) that are accessible via javascript.
Currently:
Actionscript source
ExternalInterface.call("someFunction");
ExternalInterface.addCallback("someCallback",someASfunction);
[code]....
View 1 Replies
Jun 30, 2011
I have made an image upload manager. I made it initially in Flash Develop as an AS class. I need to convert it to a component in Flash Builder 4.5 It works absolutely fine as a .swf, but I can't figure out how to make the URL request work in Flash Builder. This is what I have between the tags:[code]I didn't put the mxml controls but there is a browse button (id="selects_btn") and a label (id="label_txt") under the button that displays various status messages.I tried adding the init function to the component's creationComplete event. I receive and error saying access of a null object.
View 2 Replies
Jun 25, 2009
I want to handle some variables BEFORE Frame 1 in the action script, because I need to initialize a variable and set it to 0 only once. Later on in the animation, I will be coming back to Frame 1 and I don't want it set to 0 again, only the first time.
[Code]...
So how do you apply some ActionScript code to when the movie first loads?
View 0 Replies
Jul 9, 2010
I'm having trouble finding a workaround to get IE to play my SWF again after a user refreshes the page. Here is the part of my preloader code that isn't initializing:
[Code]...
View 2 Replies
Nov 30, 2011
setting a rectangle movieclip instance's width to 20 at the very start, before the ENTER_FRAME function is fired, but the width remains 20 throughout. I've tried different methods, here are two examples.Here's a simplified, short example:
Actionscript Code:
var rect_mcW:Number = rect_mc.width; //store original widthrect_mc.width = 20; //then set the rectangle's width to 20rect_mc.addEventListener(Event.ENTER_FRAME, growRect);function
[code]....
Ok, so the rect_mc's width remains 20 for each ENTER_FRAME event, even though the event listener function should grow it, but doesn't.One other way I tried was wrapping the 20 width inside a function:
Actionscript Code:
// opening statements omitted for brevity//first call to addEventListener:rect_mc.addEventListener(Event.ENTER_FRAME, init_width); //on first
[code]....
this second example yields the same result, the rect_mc width remains 20 even Though I thought the event listener that calls the function that sets it to 20 is removed first thing in the second event listener.
So, I assume it's because the code is read from top, and the code that sets width to 20 gets read and executed over and over. But still, shouldn't the growing part also take place over and over? What I want obviously is to store the original width, but start the animation with a width of 20, but just once.
View 7 Replies
Dec 15, 2010
I am working on optimizing a page that has Flash on it. I am using optimization practices like moving Javascript to the bottom to not block. Removing inline scripts. And minimizing HTTP requests with minified css and js.The majority of the pages content is in the flash, so loading it as soon as possible is the goal. Currently there is a 2 ~ 3 second delay before the flash is even rendered (using firebug profiling)
I am wondering at what point in the page load does the browser start initializing flash on the page? Is it once the DOM element containing the flash has been rendered? Is it once the complete onload event has been fired? I imagine it probably differs with each browsers as well.
View 3 Replies
Mar 6, 2011
So I have a custom preloader with 200 frames and the corresponding in Flex:[URL]..
So basically each procent is one frame in the movieClip. So when 100% the movie ends and application initializes.
How can I say for example so that when 100% don't start the app but play from frame 100-200 in the movieClip and then initialize the app?
View 1 Replies
Dec 24, 2011
Whenever I export the .swf file of my Flash game, I am receiving "TypeError: Error #1009: Cannot access a property or method of a null object reference.", along with a Runtime Shared Library Preloading Warning for my preloader. I have my timeline organized so that the first and third frames are both empty along with a stop(); command in the Actions layer. The second frame contains a single MovieClip that contains all of my exported assets, which are going to be initialized in the third frame of the timeline. None of my assets, except for the preloader, are exported in the first frame. What changes should I make to my Document Class for it to initialize the assets in the third frame?
[Code]...
View 1 Replies
Aug 9, 2004
I have a simple slideshow that is non-interactive. It just loops five movie clips loaded externally. Each slide is shown for a certain amount of time that is determined with getTimer.The code for the slideshow is in the last frame of the root timeline. So, basically the slideshow starts when the root timeline finishes playing. The problem is that the timer works great the first time the code plays, but when I tell the player head to back up and enter the frame again, the clips play very rapidly, as though getTimer was not being initialized.
Here is the code:
stop();
square._alpha = 0;
[code].....
View 2 Replies
Sep 11, 2006
using flash remoting and amfphp
main.fla / main.swf
Code:
// ==============================
// SETUP
// ==============================
var rootId:Number = 0;
[code]....
My problem is the fact the class works, everything works inside of it EXCEPT the remoting. It wont even initialize or run the NetDebug and it's bugging me because I have no way to debug this because of it.I get NO output errors at all, so all the MX components are on the stage correctly and amfphp is set up perfectly fine ( this whole thing works fine if I use it inline rather than class ).
View 1 Replies
Jul 3, 2007
I have this code to initialize NPCS in my game if you're in their sight range
[Code]...
View 14 Replies
Jul 14, 2009
how i can initialize the Blur Filter value in as3
View 3 Replies