A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Parent Folder as Variable?

  1. #1
    Member
    Join Date
    Oct 2000
    Location
    Los Angeles
    Posts
    71

    Parent Folder as Variable?

    Is it possible to get the name of the folder a swf resides in as a variable. I have different swfs in many folders with different names and I'd like to use the folder name as a variable for the path of the swf. For example. I have this as:

    keyArtLoader_mc.loadMovie("/movies/PTH_SkyCaptain/key_art.jpg");

    I would like to make it so I don't have to modify this path with every swf, for example:

    keyArtLoader_mc.loadMovie("/movies/"+foldername+"/key_art.jpg");

    Is this possible?
    ---------------
    bytemonster

  2. #2
    Junior Member
    Join Date
    Aug 2000
    Location
    Melbourne, FL
    Posts
    24
    Yes there is.

    Use mc._url. This will get the URL of the location. Then just parse the string.

  3. #3
    Member
    Join Date
    Oct 2000
    Location
    Los Angeles
    Posts
    71
    Right! I didn't think of that. I'll try it out and post the results.

    THanks!
    ---------------
    bytemonster

  4. #4
    Inspector General
    Join Date
    May 2001
    Posts
    493
    Originally posted by tifao
    Yes there is.

    Use mc._url. This will get the URL of the location. Then just parse the string.
    that's NUTS! amazing. never knew bout all that. the flash help on ._url is pretty revealing. thx for the tip.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center