So you're not actually using Str$(1-2)? What is your expression?
Printable View
So you're not actually using Str$(1-2)? What is your expression?
This is the exact expression I am using:
"C:\Users\keo\Desktop\pngsequence\animation"+Str$( Global Value E)+".png"
The loop also adds 1 to the global value since my png frames are named as such:
animation0.png
animation1.png
animation2.png
and so on.
Why don't you use Str$(LoopIndex("Loop Name")) ?
Thanks, that semi-worked, it loads the first frame of the animation, but not the rest, or at least I'm not seeing an animation when I trigger via the "start" animation function. Any ideas about that?
Ok I got it, I had to add more frames to the active object (not runtime). Thanks Dynasoft, your help was massive.
"C:\Users\keo\Desktop\New Folder (2)\New folder\"+Str$(Global Value)+".png" is what you're after.
But, you should use a relative folder rather than an absolute path, unless you're the only one ever going to use your app.
For example, if the images are in a subfolder "images", you could just put:
"images\"+Str$(Global Value)+".png"
Namida
If I were to put "images\"+Str$(Global Value)+".png' only, would the program find it without the need of puting the rest of the path?
In general how do I create relative paths instead of absolute ones to avoid (as you said) problems when other people run the program on their pcs?
You're both right --
You should have relative paths, but images\"+str$(Global Value)+".png" won't be found
You'll need AppPath$+"\images\"+Str$(global value)+".png" ... well I'm not sure if AppPath$ returns a \ at the end, so do some testing :)
Thanks Ricky. Do you perhaps know of any other such keywords that can be used to construct relative paths(like AppPath$)? They might come in handy for future use.
There's also AppDrive$ and AppDir$ I think. Whatever they're called, you can find them under the expression editor retrieve data from special object. One is the drive letter, the other is the path not including drive letter. In previous versions of MMF you had to use both of these, as AppPath$ didn't exist yet.