Yes, I finally see this approach:

1 - as you suggest, make child.swf detect its "running mode" (embedded or not)
2 - pass relative path to main.swf through a flashvar

I 'll have a look at System.capabilities lib.

Thx to all of you for your fast answers ;-)

Eric



At 2006-04-06   10:23, you wrote:
I think he says that when testing the child.swf there is no error but when loaded inside the parent SWF the error shows...

The only way I manage to come over this is to test inside the child.swf if it is embeded inside another swf... if so, I modify my path to the xml.

You can also put inside the parent SWF a variable telling where is the XML folder... and if the child.swf can read that "parent" variable than set the path accordingly.

//if you have _lockroot inside your child.swf... check the synthaxe before use ;-) ...

var AppendPathFolder:String = "";

if(_root._parent.PathToFolderXML != undefined)
   AppendPathFolder = _root._parent.PathToFolderXML;

MyXML.load(AppendPathFolder+ "/child.xml");

A+

Éric.

Manuel Saint-Victor wrote:

did you try the path "./dirB/child.xml"?


On 4/6/06, elr <[EMAIL PROTECTED]> wrote:


Hi all,

As many before me, I can't get rid of a "Error opening URL "file:"
message...
I set up a small swf that locally access to an xml file ( these two
files are in the same dirB)

Now using a loadMovie command,I try to load this small swf module
into a main one that is located in a parent dirA
//dirA/main.swf
//dirA/dirB/child.swf
//dirA/dirB/child.xml


I don't want any absolute path into child.swf  neither to relocate
child.xml into dirA.
Is there a clean (easy?) way to make child module recover access to its
xml ?

Thank you !

Eric

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to