Posted by Rycott in SWF Studio V3 on Feb 13 2008, 10:53 am

hi, i have the following problem:
i'm working on a project that contains the main exe file, the movie selected for the exe is the main swf of the project, it draw the stage, and 3 areas to load content.
also it loads an xml with the main menu data (sections, title, swf for the areas). every swf loaded in one of the areas needs to load data from the main movie to work.
at startup it loads the header.swf in the upper area, this swf needs to load data from the main swf, to draw the menu. and thats isn't working.

testing in flash with the main movie and loading the secondary swf, and xmls in a internet domain, it outputs" security sandbox violation", "the conection has stopped with file ............ its not allowed from http://desarrollo...........header.swf", "remote swf can't reach local files".

thanks.


Posted by mbd in SWF Studio V3 on Feb 13 2008, 02:14 pm

Where are you seeing the security sandbox message? The current release doesn't have a debug player option. Are you checking System.onStatus?

Have you tried using System.security.allowDomain? Check the Flash docs for examples of how to use that. You may need it in both your main SWF and the child SWFs to allow communication between them.

Alternatively, you could have a crossdomain.xml file on your server.

In either of those cases, the remote SWF can access data from the local SWF (main SWF) but still can't access local files. If you need the remote SWF to access local files, you should download the remote SWF to the local harddrive first, then load it. That way it loads in the localTrusted sandbox, just like the main SWF.

Also, how are you targetting the XML and SWFs from the remote SWF? Are you using relative paths, i.e. myXML.load("file.xml")? If so, is the XML file next to the EXE or on the server? If your XML file is on the server, then you'll have to use a full path to target the file on your server.


Posted by Rycott in SWF Studio V3 on Feb 13 2008, 02:44 pm

the message appears in flash when i test the main movie,
i put "System.security.allowDomain("*");" on the second frame of main swf, and now in the header.swf

the main.swf thats converts to exe, it loads an xml with full path, http://desarrollo.thesite.com/folder/setup.xml, it stores the data on a array, the n loads the header.swf in a container, when loaded the main swf execute a function in header.swf, and header.swf ask for data in main.swf to draw the menu, then loads swf icons in the menu. this way:
this.ico.loadMovie(_global.ruta.miModelo.getLaruta()+"imgs/"+img);
_global.ruta.miModelo is in the main swf, getLaruta() returns "http://desarrollo.thesite.com/folder/" and img is the swf icon.

this is complicated to explain, i will make a simple example to show. and test
thanks.


Posted by mbd in SWF Studio V3 on Feb 13 2008, 02:52 pm


QUOTE:
i will make a simple example to show. and test
That would be good. Because testing in the Flash IDE doesn't relate to SWF Studio. If it doesn't work in the Flash IDE, then there's a good chance it might not work in SWF Studio. SWF Studio does place your main SWF in the localTrusted sandbox, but remote SWFs are placed in the remote sandbox.


Posted by Rycott in SWF Studio V3 on Feb 13 2008, 04:29 pm

hi, i have made an example, eliminating extra stuffs, only the necesary. with the structure.

download: www.santiagodesign.cl/swftest/testmenu.rar i included the fla, xml,

i will be very thanksfull if you help me, i have been breaking my head 2 days.
in a web based, the application runs well, but with the main swf in the exe, not.

if the application runs as expected, when hitting a button in the header, in the main swf the dato textfield shows the data sent by the header button.

thanks in advance.


Posted by Rycott in SWF Studio V3 on Feb 15 2008, 07:40 am

done, i was using _globals to store main info.
turn to _level0.

and works.