I’m using a txt file that contains variables for image locations and text descriptions for a gallery.
I’m currently using the following code to load the info:
loadVariablesNum(“info.txt”, 0);
Works great until I put in on a website. Is this a preloading issue? I did a search and could not found several conversations, but I could not get the code to apply to my situation.
textFld.html = 1 – Sets the HTML property of the textfield with the instance name textFld to true. So this basically means that this text will be HTML enabled.
textFld.condenseWhite = true; – Is used to get rid of annoying space between lines.
textFld.htmlText = this.content – Sets the htmlText (since we set the HTML property to true) to the value of the variable content of the object this. Since lv is an object, and we used lv.onLoad, we use this to refer to lv. content is the variable from your txt file, it would look like this:
Tried that other code as well and nothing happens.
I’m trying to load variables like the following:
description9=How does he do it? With a lot of talent and a little help from Strata.<br><br>One of Matthieu’s favorite techniques involves using Strata 3Dpro combined with Adobe Photoshop to actually paint the color onto the 3D rendering.<br><br>Step 1:<br>It all starts with a sketch. Matthieu conceives the image using paper and pencil.&target9=halfimage&image9=image9.jpg&thumb9=thumb9.jpg
FMX on the Mac. Is it not compatible? BTW, don’t laugh at my code. I’m still a rookie.
I finally did come up with an ugly solution so that I could launch the project. I set up a loop that checked for the last variable in my text file. If it was empty it would continue to loop.
But of course I would still like to do it the ‘right’ way.
Your code was deprecated. That’s why I asked So what are you actually trying to do here ? You said it should loop when the text file isn’t loaded, and it should continue when it is ? So like a check to make sure ?
Yes, the idea is to check and see if the txt file (or variables) are loaded before continuing - otherwise it doesn’t run properly from a website. It always ran great on my desktop.