Hi,
assuming that you use a relative path to the swf, then you can just
use one substring:

var baseurl:String = _root._url;
baseurl = baseurl.substr(0, baseurl.lastIndexOf("/")+1);

mcl.loadClip(baseurl+"ar07ui.swf");

On 11/9/06, Hans Wichman <[EMAIL PROTECTED]> wrote:
ps that can be made way more efficient, its still under construction :)

On 11/8/06, Hans Wichman <[EMAIL PROTECTED]> wrote:
>
> Hi,
> instead of using your path directly try something like this:
> class App {
>  public static function getPath (parent:MovieClip, path:String):String {
>   var parUrl:String = parent._url;
>    parUrl = parUrl.split("\\").join("/");
>
>   var pathUrl:String = path.split("\\").join("/");
>
>   var parArr:Array = parUrl.split("/");
>    parArr.pop();
>    parUrl = parArr.join("/")+"/";
>
>   return parUrl+pathUrl;
>  }
> }
>
> And in your code:
> mcl.loadClip(App.getPath(_root, "ar07ui.swf"), ui);
>
> greetz
> JC
>
>
>
>
>
>
>
> On 11/8/06, Éric Thibault <[EMAIL PROTECTED]> wrote:
> >
> > I've redone the test on my webserver with the externalinterface and all
> > is functionning normaly if all (HTML and SWF) are in the same folder!
> > If the HTML page is not in the same folder, the external SWF must be
> > called relative to the HTML, not to the loader SWF.  Maybe your bug is
> > there!
> >
> > A+
> >
> > Mendelsohn, Michael a écrit :
> > > Thanks for trying.
> > >
> > > The External Interface is the only thing there that works for me.  I
> > get
> > > the alerts from the html page, but that's it.  It never finds the
> > other
> > > swf.  Could it be some kind of security issue?
> > >
> > >
> >
> > _______________________________________________
> > Flashcoders@chattyfig.figleaf.com
> > 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
> >
>
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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



--
Cheers,
Ray Chuan
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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