PDA

View Full Version : Dynamically change base (relative) path


antiflash
09-26-2005, 07:20 PM
We have a swf which has navigation and other UI (a.swf). From this file, we dynamically load external swf's (x.swf) based on user interaction. The paths to these swf's are stored in a database, and do not share any common path.

Loading the external movie (x.swf) is no problem, but when a particular movie has external assets itself (such as flv's etc), file paths become invalid, since a.swf and x.swf are not on the same relative path. Is there a way to dynamically set, or change the base path for x.swf when its loaded, so that all relative paths for external assets become valid for x.swf?

Thanks for any help.

nyghtrunner
09-26-2005, 11:18 PM
not sure exactly what you mean... Are you loading one movie into another, and the functionality of both starts to, for lack of a better word, spaz out?

nyghtrunner
09-26-2005, 11:21 PM
no, that's not it, sorry, I would make sure that the pathing is called upon directly. Just make a folder inside the folder containing the .swf, and just make sure that the pathing for all of it goes to that folder. If you load a movie clip from a specific folder, and tell it to call things from something else, it will only remember where it was created from (I'm pretty sure), so to ease this, just drop everything in, say, an fscommand folder, and have all the movies loaded from that folder. Then make sure that you do not change the folder structure at all. I hope that helps, and if it isn't exactly what you were asking let me know.