I'm pretty sure this is a very commonly asked questioned around here It's gotta be at least once every 2 months right?
But I'm having trouble getting external files to work by the expression(again!)
I'm trying to get an external .png file to work. I've got the external file Personal File.png and the .MFA in a zipped folder. So the code goes=
start of frame>Active Picture>New Picture>Appdrive$+Appdir$+"Personal Icon.png"
Originally Posted by Wiiman I've got the external file Personal File.png and the .MFA in a zipped folder.
I could be wrong but I think a zipped file is temporarily extracted to a Windows temp folder rather than the folder it's sitting in. That would explain why the Appdrive$ etc string isn't working for you. Have you tried setting a string to AppDrive$+Appdir$ to see what it throws up?
haha! nah Duncan is pointing out that it's obviously not gonna work if your file is called "Personal File.png" but you try and open "Personal Icon.png".
Or.. did you know that?
Or... is that not what Duncan is trying to point out?
Just so everybody knows, Appdrive$ + Appdir$ does the EXACT SAME THING as Apppath$.
Appdrive$ would return the drive the application is running from.
Appdir$ returns the application directory minus the drive letter.
So, assuming the app is running from C:\Temp\Folder1\Folder2, Appdrive$ + Appdir$ returns a sting like this:
"C:\" + "Temp\Folder1\Folder2"
Apppath$ returns the full path including the drive letter.
Again, assuming the app is running from C:\Temp\Folder1\Folder2, Apppath$ would return a string like this:
"C:\Temp\Folder1\Folder2"
The Appdrive$ method is useful if you're trying to run separate software, scripts, or files that already existed before an installation, or if your game installs files to a completely different directory than the one your app is running from. That's about the only time you'll need to use the Appdrive$ expression without Appdir$.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?