Re: [Flashcoders] ActionScript equivalent of embed/object BASE tag

2006-02-06 Thread Jan Schluenzen
Okay, thanks everyone!


On 2/5/06, Tyler Wright <[EMAIL PROTECTED]> wrote:
>
> In flash you'll have to do your own BASE tag.  You'll either need to
> prepend
> which is probably the best way to go, or do something crazy like
>
> MovieClip.prototype.oldLoadMovie = MovieClip.prototype.loadMovie;
> MovieClip.prototype.loadMovie = function(url) {
> this.oldLoadMovie("http://prepended.BASE"; + url);
> }
>
> However, I strongly recommend you don't do this in real coding that others
> might curse you for  ;)
>
> 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.
>
>
> Only in Flash 6 ... if you have a Flash 7+ movie you're value will end up
> "
> undefinedmyfile.xml".  It's one of those annoying things you just have to
> keep track of.  Just remember to validate your flashvars.
>
> _global.baseURL = (_root.baseurl != undefined) ? _root.baseurl : "";
>
> Tyler
> ___
> 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


Re: [Flashcoders] ActionScript equivalent of embed/object BASE tag

2006-02-04 Thread Tyler Wright
In flash you'll have to do your own BASE tag.  You'll either need to prepend
which is probably the best way to go, or do something crazy like

MovieClip.prototype.oldLoadMovie = MovieClip.prototype.loadMovie;
MovieClip.prototype.loadMovie = function(url) {
this.oldLoadMovie("http://prepended.BASE"; + url);
}

However, I strongly recommend you don't do this in real coding that others
might curse you for  ;)

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.


Only in Flash 6 ... if you have a Flash 7+ movie you're value will end up "
undefinedmyfile.xml".  It's one of those annoying things you just have to
keep track of.  Just remember to validate your flashvars.

_global.baseURL = (_root.baseurl != undefined) ? _root.baseurl : "";

Tyler
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ActionScript equivalent of embed/object BASE tag

2006-02-03 Thread Rich Rodecker
>The beginning or to add to the beginning. To prefix a header onto a packet
means to place the header characters in front of the packet. "To prefix" is
the opposite of "to append" characters at the end. As a verb, prefix is not
English. The correct word is "prepend," but computer people are notorious
for turning any English word into a computer term.

http://computing-dictionary.thefreedictionary.com/prefix



On 2/3/06, Rich Rodecker <[EMAIL PROTECTED]> wrote:
>
> >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] ]On 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


Re: [Flashcoders] ActionScript equivalent of embed/object BASE tag

2006-02-03 Thread Rich Rodecker
>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


Re: [Flashcoders] ActionScript equivalent of embed/object BASE tag

2006-02-03 Thread Jan Schluenzen
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


Re: [Flashcoders] ActionScript equivalent of embed/object BASE tag

2006-02-02 Thread Cédric Muller

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


RE: [Flashcoders] ActionScript equivalent of embed/object BASE tag

2006-02-02 Thread Adrian Lynch
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] ActionScript equivalent of embed/object BASE tag

2006-02-02 Thread Jan Schluenzen
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