Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:29:43 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  AIR
| |-+  AIR (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
| | |-+  How the API of an application can access to data of the current application
« previous next »
Pages: [1] Print
Author Topic: How the API of an application can access to data of the current application (Read 343 times)
Gaga
Newbie FD
*
Posts: 75


« on: 02 Feb 2010, 11:41:47 UTC »

Hi all !!!

So I m completely a beginner on the API notion ! But here is my problem :

I have a big flex project (called CS) and I have to create an API so that an external application could access to the data (server url, username, etc) of a current CS application running.

So if I understood correctly (the API notion), I ll create a project appart, my API that will access to CS Code. And the compilation of this project (API) will give a library which will be acceded by the external app.

BUT ! I see that API will be able to use fonctions, and then external applications will be able to use API functions, but what I don't get is how we'll be able to retrieve the datas of the current CS running. How the current CS will be linked to the API !? 

Don't understand anything :p Help please !!!

(Could it have something to deal with sandbox bridge ?)

THANKS !!!
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #1 on: 08 Feb 2010, 17:17:14 UTC »

Are you trying to create a system where two different applications on the same machine communicate with each other using a ColdFusion server? Or, are you trying to get two individual AIR applications to communicate with each other directly? It's not entirely clear from your post.
Logged

Gaga
Newbie FD
*
Posts: 75


« Reply #2 on: 10 Feb 2010, 11:41:46 UTC »

Sorry for not having been very clear it was a little bit blurry for myself :p

So in fact I ve solved my "problem" by creating another project "MyAppliAPI" where I set the EventDispatcher to communicate with the MyAppli.
And on the subbaplication and module side :
Code:
this.myAppliApi = new MyAppliAPI(this.systemManager.loaderInfo.sharedEvents)

On the "MyAppli" side (where I load the subapplication) I created a new Class "MyAppliAPIBridge" where I set the EventDispatcher to communicate with the subapplications. This has to be the same as the one set in "MyAPI".
For subapplications (Application) it is :
Code:
this.myAppliAPIBridge = new MyAppliAPIBridge( swfLoader.content.loaderInfo.sharedEvents);
After that the subapp had been loaded. (code in the MyAppli)
For Modules :
Code:
this.myAppliAPIBridge = new MyAppliAPIBridge( this.systemManager.loaderInfo.sharedEvents)


Logged
Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC