Xml :: Loading A Configuration File BEFORE The Flex Application Loads?

Apr 19, 2010

We are using an XML file as an external configuration file for several parameters in our application (including default values for UI components and properties values of some service layer objects). The idea is to be able to load the XML configuration file before the flex application initializes any of its components. This is crucial because XML loading is processed a-synchronously in flex, which can potentially cause race-conditions in the application.

For example: the configuration file holds the endpoint URL of a web service used to obtain data from the server. The URL resides in the XML because we want to allow our users to alter the endpoint URL according to their environment. Now because the endpoint URL is retrieved only after the XML has been completely loaded, some of the application's components might be invoking operations on this web service before it is initialized with the correctendpoint.The trivial solution would have been to suspend the initialization of the application until the complete event is dispatched by the loader. But it appears that this solution is far from being trivial. I haven't found a single solution that allows me to load the XML before any other object in the application.

View 1 Replies


Similar Posts:


Java :: Externalizing Client ChannelSet Configuration For Flex Web Application?

Dec 10, 2010

I am looking for an approach that will allow me to (somehow) dynamically pass the server name, server port, and web context to my Flex client so it can create a ChannelSet for it's RemoteObjects to use. These three properties are, of course, readily available to my Java server-side code so I just need a way to get them to the client.

By default, Adobe says you should compile your Flex application against the server configuration file "services-config.xml". This is a highly inflexible practice that Spring says should be avoided (I agree).

One popular approach is to use Flex's http service to download an XML configuration file. I like this idea, but I don't want to hard-code an XML file and keep it inside my WAR file. Is there a way to dynamically generate this from Java code?somehow use flashvars to pass the properties in from the containing HTML page to the SWF file. But again, I don't want to hard code them into the HTML page. Is there a way (maybe with Javascript?) to dynamically set the value of these when the page loads?

View 1 Replies

Flex :: Build - Including Configuration Files While Compiling A Application With MXMLC

May 17, 2010

I'm using:

- Flex SDK 3.5.0
- Parsley 2.2.2.
- Flash Builder 4

Down in my src folder (which is configured as part of the source path in the Flash Builder), I have a logging.xml which I configure via Parsley:

[Code]....

View 1 Replies

Flex :: Configuration - Host And Load KML File In Flex Project (IGN)?

Jul 23, 2010

I'm looking at a tutorial to display placemarks using a KML file on a flex application. I'm using IGN API (openscales) in flex project. The example works perfectly (http:/[url].......

<os:KML url="http://www.parisavelo.net/velib.kml"
proxy="http://openscales.org/proxy.php?url="
numZoomLevels="20"
style="{Style.getDefaultCircleStyle()}"/>

But when I'm hosting the same kml file on my server like that :

<os:KML url="http://www.cycom.org/velib.kml"
proxy="http://openscales.org/proxy.php?url="
numZoomLevels="20"
style="{Style.getDefaultCircleStyle()}"/>

Placemarks don't show up on the map. I tried to host the kml file on different hosts but that doesn't change.

View 1 Replies

XML :: Loading File In Flex Before Application Start / Initializes

Jul 22, 2009

I've got a configuration xml file that I need to parse for values before a flex application loads. I've created a static class that allows for the values in the xml config file to be retrieved. I'm initializing this class when the application first loads but as the xml file is loaded with a Loader class that loads a synchronously the class is being asked for values before the xml file is actually loaded - so it is throwing a error. Is there a way to load this xml file synchronously. We cannot embed the file as a class variable as we need to be able to change the values remotely.

View 5 Replies

Data Integration :: Find The Application-level Configuration Folder?

Feb 24, 2010

I hope i'm in the correct forum to ask this. I am trying to find the application-level configuration folder for my Flash CS4 program.
 
I assumed it would be in C:Program FilesAdobeAdobe Flash CS4enConfigurationComponents
 
But it is not. Should I have such a folder? And, if so, where should it be?
 
Or do I need to create it myself?

View 1 Replies

ActionScript 2.0 :: Furniture Configuration App - Drag N Drop Application With Logic?

Oct 7, 2006

I need to develop a Build-Your-Own cabinet configuration application for a cabinet company. I need it to be a drag n drop application. there is a grid system involved, where you can fit 3 large cabs in a grid, or 6 small ones, and so fourth...so there is logic involved. Anyone ever build something similar? a drag n drop application with logic?

View 8 Replies

Actionscript 3 :: A Custom Clip To Run While Flex Application Loads Itself

Jul 15, 2010

Whenever a swf is loaded a custom movie is shown (by default a rotating circle), is there some way where I can have my custom movie to play there.

View 1 Replies

ActionScript 3.0 :: Pre-loader Loads 80% Of File Before Loading Itself?

Nov 22, 2010

The SWF loads itself almost entirely before even displaying Frame 1 (the pre-loader). Said pre-loader exists in it's own scene; when this scene is exported on it's own, the file size is 1.6 megs (the full export of all scenes is 1.9 megs). There is VERY little content in the preloader, in fact, a blank first scene exported on it's own is ALSO 1.6 megs. There is, however, a lot of content throughout the rest of the file (music, graphics, font, all embedded at the request of a client).It looks sort of like it's trying to ensure that some arbitrary amount of the resources are present before the first frame loads.

I used to be deep into Flash way back in the CS3 days, but haven't touched it since; the result is I am fairly familiar with AS3 but CS5's new features (many of which seem to replace entirely code-oriented methods with point and click methods) often times make me scratch my head, so you'll have to forgive me if this is the sort of 'five times a week question' y'all are numb to by this point.but I'm still not entirely sure.I've already scraped every last little bit of that awful TLF text stuff from the project, and I've fiddled with the action script settings but haven't had any luck.I'm not exactly sure what code to post here, as little of it seems relevant (after all, the problem appears to be happening before anything I've written runs). Please, though, if there's anything I can do to make this more clear, I'm totally willing to oblige.

View 3 Replies

ActionScript 3.0 :: Loading A Swf File Who Loads Multiples Swf

Jul 17, 2010

I'm working on a presentation who loads a gallery built in a .swf file.

I'm using the following code (Actionscript 3):

var container:Loader = new Loader();
container.load(new URLRequest("gallery-v1.swf"));
addChild(container);
container.x = 0;
container.y=100;

So far so good this code works ok, loading gallery-v1.swf in the correct place. But the gallery also load a few swf itself.

The result is when I load the gallery, is placed in the correct position, but the gallery also loads other swf files on the root(?) of my project, in the 0,0 position and overlapping or clearing my job!

View 1 Replies

ActionScript 2.0 :: Loading Into The Movie Loads A Easily Editable External XML File?

Sep 15, 2009

I know this goes against the logic of most menus. I am building a menu. I have very nice mc called "menu_list" and loading into the movie loads a easily editable external XML file with all my over categorys and sub menus

it looks like this...client.niallohara.net/xml_menu.html

[Code]...

View 0 Replies

Flex :: Gui - Switch Between Different Applications(mxml File With Application As The Root Tag) In A Big Application?

May 16, 2010

I'm new to flex. Now I'm writing an flex application. I plan to split my application into some MXML files(Application as the root tag). How can I switch from one mxml to another?BTW, what is the best practice for design large flex application? Just one MXML Application and many MXML component or many MXML Application?

View 1 Replies

Flex :: Get Around A Security Sandbox Violation When A Swf Is Loading Another Swf Which Loads Another Swf?

Oct 30, 2009

I have a AS3 swf [1] that is loading another AS2 swf [2] which is loading another AS3 swf [3].

I'm getting a Security Sandbox violation on the AS2 swf trying to access the last AS3 swf (3), but I'm using Security.allowDomain("*") in practically all the classes of the first AS3 swf (1).

View 1 Replies

ActionScript 3.0 :: How To Make Class To Manage XML File Configuration

Oct 17, 2009

I'm trying, without success, to make a class to manage a XML file configuration. This class has some methods to get a XML file and return a object E4X (XML) to user (programmer).

Then I created a package:
components.datahandlers
And the class to handler XML config file:
XMLConfigHandler.as

The code, that class, is below:
package components.datahandlers{
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.xml.XMLDocument;
import flash.events.*;
import flash.errors.*;
public class XMLConfigHandler {
[Code] .....

The trace above shows: NOT. But if I get a trace inside onLoaded method, it is show: YES. Why "xmlLoaded" property don't change to YES? How can I make this works?

View 5 Replies

Flex :: Swfloader With A Swf Which Loads Another Swf File?

Mar 23, 2011

I have one Swfloader. This swfloader loads file A.swf.On creationComplete event, File A.swf loads another swf(file B.swf).

Everything works fine when I run the application once in the same machine.But when I run two or more instance of the application, the first works fine (both file A and B are loaded) but the second swf (file B) is not loaded by file A.why the first swf (file A) doesn't load file B, when the application is running in multiple instance ?

View 1 Replies

ActionScript 2.0 :: When The Xml Menu Loads Swf File Its Structure Loads But Not Its Data?

Feb 23, 2010

have this flash xml menu that loads external swf files like this:

Code:
<item title="ABOUT"content_path="http://mysite.com/folder1/folder2/folder3/about.swf"target=""mouse_rollover_color="0xFFFFFF" mouse_rollout_color="0xDDDDDD" />

and I have this swf file with cms that I'd like for this menu to load. Currently the swf file load external text using this code:

Code:
if (contenturl1 ne "") {
loadVariablesNum(contenturl1 + "/" + userid + "/content.txt", 0);[code].....

but when the xml menu loads this swf file its structure loads but not its data.I tried using :

Code:
this._lockroot = true;

in the loading swf main time line but it did not work.I should also mention that the dynamic data that loads onto the swf that is to be loaded by the menu, resides not in it main time line but 4 movie clips deep .I don't know if that makes a difference or not.

View 1 Replies

Flex :: Adding Runtime-library-path To Flex Build Configuration Using Ant Mxmlc Task

Feb 9, 2011

I'm trying to build a flex project, linking it to some RLSs. When setting up the project in Flex Builder, the corresponding "build configuration" (that I got by adding -dump-config to the compiler options) generates (among other things) a tag like this :

<runtime-shared-libraries>
<url>some-lib.swf</url>
<url>some-other-lib.swf</url>

[Code]....

View 2 Replies

Flex :: Add Custom Configuration Variables?

May 19, 2010

We have to deploy a flex app through a series of development tiers. We are not using Blaze_DS or LCDS. My data/service urls are tier specific and are currently embedded in AS files. We'll be building the project on each tier. I'd like to make them environment variables, but am not sure what the best way to do at compile/build.

Is there a compiler option to read in a custom-config.xml? or -myCustomVariable = value? or should we just setup the build to select a config.as file?ted.

View 1 Replies

Configuration In Adobe Flex Builder

May 3, 2011

I installed Adobe FlexBuilder 3 Pro Eclipse Plug-in 3.0.2, but when i want to configure weblogic inside widows->preferences->server then server link button won't be appeared inside flex builder. can anyone help me out how i have to configure weblogic inside adobe flex builder.

View 2 Replies

Xml :: Actionscript 3 - Dynamically Load An Xml Configuration File Into A Flex4 / Flash Movie At Runtime?

Jan 27, 2010

I've got a rather simple question about loading in an xml file at runtime in a SWF. I've found a couple different methods to load in the xml.

myXml.load("file.xml");
HTTPService object
URLStream object

What is better way to load an xml file that always has the same name and is located in the same folder as the SWF on the web server?

View 1 Replies

Flex :: Reading Server URL From AS3 For Cairngorm Configuration

Aug 30, 2011

I need to read the URL that the browser shows when a Flex application is called because I would to reference it in a mxml configuring Cairngorm remote objects. The goal I would reach is to automatically configure Cairngorm services from environment to environment (dev,test,qa,prod) without statically set the value in the mxml or other ActionScript. Since the Flex client is deployed in the root of the war of the webapp, it's enough to read where the browser is pointing.

I have written a class that is doing so:
public class ConfigServer {
public function ConfigServer() {
var loaderUrl:String = FlexGlobals.topLevelApplication.loaderInfo.loaderURL;
var urlToSet:String = <loaderURL-string-manipulation>;
_serverUrl = urlToSet;
[Code] .....

But whenever I call the ConfigServer constructor and for every (known to me) technique I applied (statics or singletons or public ro so on), I have always had the same error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at org.fao.fapda.util::ConfigServer()[C:devworkspacesFAPDA runkFAPDA-clientsrcorgfaofapdautilConfigServer.as:8]

Cairngorm services initialization is done as follow:
<fx:Declarations><cut/>
<services:FAPDAServices id="services"/>
<cut/></fx:Declarations>
And the problem is that FAPDAServices.mxml is read runs before FlexGlobals is valid. Is there a point in the Flex Application lifecycle where such loaderURL is defined so that I can construct ConfigServer? When in startup events that initialization in done?

View 1 Replies

Actionscript 3 :: Flex Builder - Set Relative Url In Launch Configuration Properties?

Jul 20, 2010

I am trying to use a custom html wrapper for my application, but when I browse to choose my file it defaults to an absolute path to my custom-wrapper.html file. I want to be able to pass off this project via SVN without any necessary configuration changes, but I'm not sure how to input a relative URL into this configuration dialog. I tried standard back referencing from where my main actionscript application file is in the src directory (i.e. ../../bin-debug/custom-wrapper.html), but that does not work.

I think that I need to use properties like ${DOCUMENT} or ${FLEX_HOME}, but I'm not sure where these properties get defined and which ones come by default in the environment.

View 1 Replies

Actionscript 3 :: Loading External .swf File In Air Application Causing Looping Constructor

Apr 19, 2011

I'm building an Air application (straight AS3 no flex) that embeds and displays a .swf file. [code]Not only does this not add the .swf file to the display list like I want it to but it seems to run over and over again. "hello" fills up the output window from the trace statement like it's running every frame.The code loads a .jpg just fine so it must be a problem specific to flash files. I would think I would get some kind of security error if there was a conflict not this strange looping constructor. Does anybody have any ideas what is causing this behavior?So I think what was happening is that because both flash files shared the same application domain and they both had "Main.as" as the main class file it was running the constructor over and over again.I've updated my code above to show my unsuccessful attempts to load the external .swf with a different application domain.

View 1 Replies

Include Properties File Or Config File In Flex Application?

May 21, 2011

I have a flex application which contains different feature that includes google maps, twitter, facebook etc.

Currently I have hardcoded api keys in the code it self but I want to use a properties file/config file where I can put such things and use anywhere I want in the application.

Is it possible to achieve this in flex? I am using swiz framework. Is it possible to achieve this using this framework?

View 3 Replies

Xml - Flex Application Loading And Synchronicity?

Nov 11, 2009

I know there are a lot of questions that have been asked about synchronicity in Flex, but I'm not sure if any cover the same issue I'm having. The title only refers to one possible solution I've been going for with this, but essentially here's my situation:

Say I have a Flex application, and I have an XML file with configuration settings I want loaded into that application, preferably at run-time (Although I would've been fine with compile-time as well but can't find a way to do this as the "-define" command-line parameter will only instantiate strings, numbers, and Booleans and I have some more complex configuration structures - I also cannot merely create these as a bunch of constants in Flex because they are used in numerous other places).

However, some of these configuration settings are also used in the various children of the application when they load, so there's no way to perform and complete the load before these containers are loaded (Because of asynchronicity - these children are loaded while the configuration is still being loaded in and parsed using an event listener and handler; of course, before the handler completes, the children components are already loaded incorrectly).

Is there any way to get this configuration file to load before the application's children do? Or even before the application itself? This approach of synchronizing the application load is only one possible approach, but no other approaches seem to fare any better.

View 3 Replies

Flex :: Loading External SWF Into AIR Application?

Mar 16, 2011

I'm trying to load external SWF (JW Player) into my AIR Application using loadBytes. I'm using the following code:

import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.Sprite;

[code].....

View 1 Replies

Have An Animated Logo Swf File That Loads And Runs Once On The Home Page Every Time The Page Loads?

Jun 25, 2009

I have an animated logo swf file that loads and runs once on the home page every time the page loads. The logo has been updated to appear in three different colour schemes. I want one scheme to load and when the page is refreshed or revisited, one of the other colour schemes to load in its place. They can appear in any random order, just a different one to the one that played before reloading.Can someone point me to an answer or tell me how to do it? I have found a way in JavaScript but this only works on plain images, not swf files.

View 6 Replies

Flex :: Loading SWC / SWZ's At Runtime Within A Air 2 Desktop Application?

Sep 23, 2010

Has anyone got any experience will loading SWC / SWZ's at runtime within a Flex 4 / Air 2 desktop application?The very rough idea would be to have a desktop Air app, which is able to "download" additional modules (eg, a SWZ/RSL representing a form) and load these at runtime?

Imagine the App is configured using an XML file obtained over the net. When this has instruction to get a new module (SWZ/RSL), the app will download the module to its App Storage folder, and instanciate it at runtime?The Flex Manual seems to indicate this is possible, but is talking web rather than desktop http:[url]....

View 2 Replies

Android :: Flex - Loading Module On An Air Application?

Dec 13, 2010

I'm building an Air for Android App and I'm having problems loading a flex module. Does anyone know if loading modules is possible???

I built a simple app with just a ModuleLoader in it, which loads a mx:module. The module has only a simple mx:Label with a "Hello World" text.I build a .air with this. Then I build a .apk with the followin adt command.

adt -package -target apk-emulator -storetype pkcs12 -keystore certificate.p12 hello.apk hello.air

The application works just fine when running it on the PC, but when I do it on the apk-emulator it just goes blank and throws error #2032.

View 1 Replies

Flex :: Loading Modules In A Mobile Application?

Jan 9, 2012

I am going to write a Flex mobile application which can benefit from loadable modules, but encountered "Modules are not supported for AIR mobile applications." statement here.

Is there any workaround to load swf modules (containing UI with some code) in the mobile application developed for iPhone/Android/BlackBerry?

View 1 Replies







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