Lu Aye's
Blog, images and projects: Feed
LuAye.com
RSS Feed 
| All | Life | Ideas and thoughts | Reviews | Shout out | News | Coding |
<Previous Post Next Post>
My first AIR app
  Coding
A quick port of my Console-remote to AIR...
I was hoping to be able to use this AIR console-remote for all platforms (local swf/remote swf/flex/air, etc...), but it's not possible...
Because, sandbox for AIR apps are 'application' while SWF sandbox can be 'local' or 'remote', etc...
I don't think there is a way to link up the sandboxes and therefore I will not be able to use this air app to work on all platform... :(

It looks great tho...
If you dare... download


UPDATE:
I take back my negative statement.
I managed to connect from flash (of any domain/sandbox) to AIR. The trick was to add _ (underscore) at the beginning of connection name, and flash treat it as a shared/all domain connection.
Update download of this (v2.1) will be available soon in Console projects page:
http://code.google.com/p/flash-console/

  Post a Comment
Name :
Email :
Comment :
 
Comments: 4
  Joe
\"The AIR application sandbox—This sandbox contains content that was installed with the running AIR application. By default, files in the AIR application sandbox can cross-script any file from any domain. However, files outside the AIR application sandbox are not permitted to cross-script the AIR file. By default, files in the AIR application sandbox can load content and data from any domain.\"

http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e3f.html

Is there anything that could be done with this in mind? Can AIR read a SWF\'s SharedConnection?
 
  Lu
I think the link is about domain security sandbox. Where as the problem here (as far as I understand) is SharedConnection's local-remote-app sandbox, which determines if a SWF file stored in a local drive is allowed to access the net. - and there seems to be another 1 called application which is neither local or remote :/

In Remote air: [C] Remote started. sandboxType:application ...
In Remote swf: [C] Remote started. sandboxType:localTrusted ...
As far as I know flash is made not to be able to jump between sandboxes. But I am really hoping I am wrong :D
I'll try some alternative ways to get through it maybe SharedObject, but that'll be slowwwwww...
 
  Joe
Ahhh I see. That\'s a shame. I\'ll have to put my thinking cap on and see if we can think of a way round it... :-)
 
  Lu
Actually Joe I think you were right. It was something to do with domain. Now I set the SWF to send directly to AIR's domain, which is 'app#com.luaye.consoleRemote', and it worked!

I now need to figure out how both Remote and Client can automatically find out what domain it should send data to...