Flex :: Initialize Loading Event On Program?
Jul 15, 2010what the onLoad() or similar Event is in Flex? I'm trying initialize, but no joy.
[Code]....
what the onLoad() or similar Event is in Flex? I'm trying initialize, but no joy.
[Code]....
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 Repliesim loading multiple images but how do I make sure the program will start once all images have dispatched a complete event. like make a universal loader for all the other "small loaders" if you understand.
View 1 Repliesi created a game with 2 frames:1 is the welcome screen + player name input text box.the other is the game itself.at first the game didn't have the welcome screen, and if i wanted to play (with the arrows keys) there was no problem to press one of the arrows and make the player move..since i added the first frame, in order to play i must click somewhere on the stage and only then i can press the arrows keys.. before clicking nothins happens! it happens only if i have more than 1 frame..it is important to mention that it happens in the flash player ( i didn't check what happens in web browsers..)
View 2 RepliesBefore this application runs, I have to do some basic intialising - load up some stuff, build the display list, check I've got the right xml, wire a few objects together. I'm used to doing all of this stuff in the constructor of Main() - my main application class, but it gets a little unwieldy. Would there be any mileage in offloading this into a command class? Is that common practice? I was thinking that way all that Main() would have to do is just listen for events and manipulate methods of the other main classes. The only thing that concerns me is that Main needs references to the main classes and to add event listeners etc. This could be tricky if it's all set up in a command...
View 1 Repliesi have the following code ]
[Code]...
but no connection established what is the reason behind not know help required and one more thing XAMPP is installed in D: drive.
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<?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 ?
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?
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].....
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 RepliesI 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 RepliesI'm learning MVC and wanted to start out with a simple program that counts mouse clicks on the stage. Any help would be great. There's no library objects on the stage linked to anything. Everything is done in code. I'm receiving error -
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Controller()
at run_fla::MainTimeline/frame1()
[code]....
fla I don't have a doucment class or view class yet.
Code:
var m:Model = new Model();
var c:Controller = new Controller(m);
addChild(c);
i want to know what i should put befor .mx_internal
override public function initialize() : void
{
var target:DialogButtons;
var watcherSetupUtilClass:Object;
[Code]....
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 RepliesHow to initialize and make condition for 2 variables in single for loop in Flex let keep i and j are two variables
View 2 RepliesIn 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..
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.
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?
I have an AS 3.0 class that loads a JSON file in using a URLRequest.
package {
import flash.display.MovieClip;
import flash.display.Loader;
[Code]....
When the file is finished loading, the mapHandler event makes changes to the class properties, which in turn are accessed using the getMapWidth function. However, if the getMapwidth function gets called before it finishes loading, the program will fail.
How can I make the class wait to accept function calls until after the file is loaded?
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]...
I'm an experienced AS developer, but this is something very basic about flex that I can't figure out. In the class below, I'm not sure why the function imageLoaded would not be executed when the image loads a url. Is there a race condition happening here? The application is completely loaded by the time this object is created and setPicture is called. How can I get the Event.COMPLETE event to fire properly in this case?The line and Log.info functions are conveniences for me, and they definitely work. Here's my MXML definition:
<?xml version="1.0" encoding="utf-8"?>
<photo:PhotoClass xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:photo="com.xxx.widgets.photo.*">
[code]....
Core of my code is following:
var img:Image = new Image;
img.source = 'http://..........';
img.autoLoad = true;
[Code]....
I found that, the complete event does not occur for some images. How can I catch complete event without signal leaks?
Im trying to add an exit button onto my program so when its clicked it exits the program completely.. I've tried some of the suggestions on the forums but they arnt working. what I have been using and its not working..
// CLICK to Exit
exit_Btn.addEventListener("mouseUp", goExit);
function goExit(evt:MouseEvent) {
fscommand("quit");
};
Is there a way to start an unrelated program (such as Window's media player) from inside of a flash program?
View 2 RepliesMy program reads a rather large data file that is crucial to the display of the program I am making.I have an event listener that waits for my loader to load all data from the file, and it then adds all the data (and parses it) to a 2d array.Unfortunately the program flow doesnt wait for the loading to finish, so when it checks the array, it is still empty because nothing is loaded into the array yet.
View 9 RepliesI need to program a timer for a typing tutorial program. It needs to go to 5 minutes. When the timer gets to 5 minutes the movie has to go to frame 13 which displays the results of the typing test.
View 1 RepliesWhat button event should I use to make the program understands to DO SOMETHING only when the button is pressed/dragged. In my sample code below, I want something to happens only if the button is dragged beyond 200 in y axis. I tried onRelease, onRollOver and onDragOver but still not working
[Code]....
I have editable grids which are 2-way binded to my model. What I want is to validate my data when user edits any cell before it get updated in model. I have applied my validation at ItemEditEnd handler, but, I want to apply validation in between itemEditBegin and itemEditEnd events.
View 1 RepliesIf i run the program i get some errors.If we include a class in a package how should the program be run?[code]...
View 2 Replies