This content has been marked as final. Show 4 replies
Without looking too deeply, I think I remember that, yes, it doesn't work.
I usually end up using BuddyAPI for this.
"Darrel Hoffman" <email@example.com> wrote in message
> Don't know why this doesn't work, but the default folder setting in the
> FileXtra open/save dialogues doesn't seem to work as advertised. My code
> goes like so:
> currentLevel = fxObj.fx_FileOpenDialog(the moviePath &
> "\Levels\","*.lvl","Load Level",False,True)
> the moviePath & "\Levels\"
> should be the correct folder, but instead, it always defaults to My
> Documents for some reason. (When running as a projector. In Authoring
> mode, it defaults to the moviePath, but ignores my sub-folder.) Either
> way, it never gets it right the first time. The second time and
> subsequent times, it always goes to wherever you last opened something,
> but the first time is always wrong. I did notice that the example in
> their documentation:
> put fxObj.fx_FileOpenDialog("C:\My Documents\", "Text Files/*.TXT","Choose
> a text file", True, True)
> does use My Documents as its default, but I've changed that, so it should
> be going to the folder I pointed it at.
I don't know if this is your problem, but it may be an issue...
go into the message window and type this:
put the moviePath
It will tell you the path that it is using... but the important thing to
note is that there is a backslash at the end...
In your code, you are taking the moviePath and adding "\Levels\" to it.
That will lead to a double backslash between the moviePath and Levels.
It could be the cause of your problem.
But I would take Craig's advise and use BuddyAPI instead. I have always
had more consistently good results with it over FileXtra
> In your code, you are taking the moviePath and adding "\Levels\" to it.
> That will lead to a double backslash between the moviePath and Levels. It
> could be the cause of your problem.
Nail on the head there. Thanks.
(Yes, I could use Buddy for this, but since I have the unregistered version,
I can only use 2 functions in one movie, so I try to avoid using it unless
there's really no other way. I'm already planning on using it for file
encryption later, and that leaves me with just one discretionary function,
for which something else may come up later. One of these days I'll get
around to buying the full version, but I'm working on pretty much no budget
here, and there's quite a few other things on my "to buy" list before that.)
> and there's quite a few other things on my "to buy" list before that.)
You'll find that once you /have/ bought it, you use it in every project
and it becomes a huge time saver.