[Flashcoders] Projector, loaded SWFs and audio files

2009-06-11 Thread Eric E. Dolecki
Quick question.
I have a projector that loads SWFs on demand. The SWFs are in a subdirectory
called Sections. Each section SWF that loads into the directory loads it's
own audio from a folder inside the Sections directory. Works fine on their
own, but when loaded into the Projector, the relative path is off as the
SWFs loaded into the projector now think they are at the same directory
level as the projector and the load audio gets botched.

How can I fix this so it works from the SWF themselves as well as within the
projector (without embedding the audio anywhere)?

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


Re: [Flashcoders] Projector, loaded SWFs and audio files

2009-06-11 Thread Hans Wichman
i just read that post again and boy is that thing old... anyway the basic
idea is still the same, but the execution can be improved:)

On Thu, Jun 11, 2009 at 8:11 PM, Hans Wichman 
j.c.wich...@objectpainters.com wrote:

 Hi Eric,

 are you using as2 or as3?

 The basic solution is to look at the url of the loading swf, and make your
 paths relative to that.
 If you make it a little more complex (but usually some splitting and
 joining will be enough) you can use something like this:
 http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/

 but it's as2.
 I have an as3 version as well if you need it.

 greetz
 JC

   On Thu, Jun 11, 2009 at 3:27 PM, Eric E. Dolecki edole...@gmail.comwrote:

 Quick question.
 I have a projector that loads SWFs on demand. The SWFs are in a
 subdirectory
 called Sections. Each section SWF that loads into the directory loads
 it's
 own audio from a folder inside the Sections directory. Works fine on their
 own, but when loaded into the Projector, the relative path is off as the
 SWFs loaded into the projector now think they are at the same directory
 level as the projector and the load audio gets botched.

 How can I fix this so it works from the SWF themselves as well as within
 the
 projector (without embedding the audio anywhere)?

 E
 ___
 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] Projector, loaded SWFs and audio files

2009-06-11 Thread Hans Wichman
Hi Eric,

are you using as2 or as3?

The basic solution is to look at the url of the loading swf, and make your
paths relative to that.
If you make it a little more complex (but usually some splitting and joining
will be enough) you can use something like this:
http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/

but it's as2.
I have an as3 version as well if you need it.

greetz
JC

On Thu, Jun 11, 2009 at 3:27 PM, Eric E. Dolecki edole...@gmail.com wrote:

 Quick question.
 I have a projector that loads SWFs on demand. The SWFs are in a
 subdirectory
 called Sections. Each section SWF that loads into the directory loads
 it's
 own audio from a folder inside the Sections directory. Works fine on their
 own, but when loaded into the Projector, the relative path is off as the
 SWFs loaded into the projector now think they are at the same directory
 level as the projector and the load audio gets botched.

 How can I fix this so it works from the SWF themselves as well as within
 the
 projector (without embedding the audio anywhere)?

 E
 ___
 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