HI Dave,
  It's my understanding that that _should_ work. However,
Const.portfolioPath isn't replaced at compile time - Flash has no
native understanding of constants. But at runtime, Const.portfolioPath
should certainly return your hardcoded path.
  The only immediate things I can think of which might throw this off are:
  - The loader movie (not resources.swf) contains a different verstion
of the Const class. The first version of any class loaded by Flash is
the one that is used throughout the app, regardless of what's compiled
into movies loaded later on.
  - The loader movie is compiled for a different version of Flash
Player from the resources movie. From memory, a Flash 7 movie has a
_different_ global variable space from a Flash 8 movie (or is it 6 and
7? Can't remember offhand), even if they're both running in the same
player.

HTH,
  Ian

On 3/23/06, Dave Mennenoh <[EMAIL PROTECTED]> wrote:
> Can someone kindly point out my lack of understanding here - so that I don't
> need to use any globals I created some static getter and setter methods in a
> class I call Const - for constants. Here's a short version, but enough to
> illustrate with:
>
> class Const {
>     static function get portfolioPath():String {
>         return "hardCoded path to my images folder";
>     }
> }
>
> Within my resources movie I say something like:
>
> myLoader.loadClip(Const.portfolioPath + "imageName.jpg", picHolder);
>
> This works great. But, when I load resources.swf into my navigation movie,
> Const.portfolioPath is showing undefined. This has me baffled. I thought the
> reference to Const.portfolioPath would be replaced with the "hardCoded path
> to my images folder" when the resources.swf was compiled... Evidently it's
> not though?
>
> To get around this I created a portfolioPath timeline variable within
> navigation and then reference it from resources using _root.portfolioPath,
> but this isn't how I'd prefer to do it.
>
> Thanks.
>
>
>
> Dave -
>
_______________________________________________
[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