>You could do it manually. Create a variable and prepend(not a word!) it to
all your loadMovie(), load() etc. calls.

damn, i always thought prepend was a real word.

anyway, I dont know of a way to set the BASE tag in actionscript, and this
sounds like the solution i would go with.  PREPEND all your calls with a
variable so they would look like xml.load(baseURL+"myfile.xml")...this way
if the baseURL variable doesn't exist, the call will still work. Then, if
you wanted to, you could pass in the baseURL value through flashvars or
something, so you wouldnt have to recompile whenever you wanted to change
it.





On 2/3/06, Jan Schluenzen <[EMAIL PROTECTED]> wrote:
>
> Unfortunately _lockroot doesn't fix the path problem. Even if the _root is
> being changed through _lockroot, the base path is still the one of the
> wrapping SWF. I guess I'll have to go with Ade's suggestion unless
> somebody
> has another idea...
>
>
> On 2/2/06, Cédric Muller <[EMAIL PROTECTED]> wrote:
> >
> > did you try '_lockroot' ?
> >
> > cedric
> >
> >
> >
> > > You could do it manually. Create a variable and prepend(not a
> > > word!) it to
> > > all your loadMovie(), load() etc. calls.
> > >
> > > Ade
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] Behalf Of Jan
> > > Schluenzen
> > > Sent: 02 February 2006 10:23
> > > To: Flashcoders mailing list
> > > Subject: [Flashcoders] ActionScript equivalent of embed/object BASE
> > > tag
> > >
> > >
> > > Hi-
> > >
> > > does anyone know of an ActionScript equivalent of accomplishing the
> > > effect
> > > of the BASE tag (part of the embed and object tags in HTML)?
> > > The problem is, I have a flash application that loads XMLs and SWFs
> > > relative
> > > to the application's base SWF "index.swf".
> > > Now I need to load my "index.swf" into another container, a stand-
> > > alone
> > > projector. I don't want to fix all paths within my application so
> > > that they
> > > are relative to the new container (which is outside my actual
> > > application
> > > folder). Is there some way to set the basepath through actionscript?
> > >
> > > To clarify, here's the structure of my app:
> > >
> > > + root
> > >       index.swf
> > >       some.swf
> > >       other.swf
> > >       + content/
> > >             foo.xml
> > >             bar.xml
> > >
> > > Now with the new container, it will look like this:
> > >
> > > + root
> > >       container.exe (Stand-alone Flash projector)
> > >       + data
> > >             index.swf
> > >             some.swf
> > >             other.swf
> > >             + content/
> > >                   foo.xml
> > >                   bar.xml
> > >
> > >
> > > Since all paths for loading files are now relative to the
> > > container.exeinstead of
> > > index.swf, everything's broken..
> > > Is there an easy fix?
> > >
> > > Jan
> > > _______________________________________________
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > _______________________________________________
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to