Does using a formula in a “Flash Art SuperObject” actually work?
I have a FileGlobal variable called fgVideoMedia1
I have a FASO object called Video1
The FASO has a Default image that it pulls from the “Flash Art Scrapbook”.
I populate the “Formula” section of the “FASO” with @fgVideoMedia1
In my code, I have:
...
If «Video1» ≠ "" And FileExistsPath(«MediaPath»+«Video1»)
fgVideoMedia1 = «MediaPath»+"Video1.mov"
Else
fgVideoMedia1 = «MediaPath»+"NoVideo.png"
Endif
...
I don’t know if this is a typo but shouldn’t the formula simply be fgVideoMedia1 without the leading @? You could then add showpage after the showvariables fgVideoMedia1 statement. If your paths are correct this should work as expected. You can check the paths by adding message fgVideoMedia1 at the end to see what the path and file name look like together.
If you prefix with the @ symbol, then the variable itself must contain a formula, which is then re-evaluated. Normally in Panorama 6 you could not change an object’s formula on the fly (like you can with Panorama X). The Super Flash Art and Text Display objects provide this @ prefix to allow the formula to be changed on the fly. Also, this gets around the 256 character limit that these objects normally have for the formula.
Go back to the previous page in the Panorama Handbook. It says –
Formula in a Variable. If the first character of the formula is @ Panorama treats the rest of the line as a variable name instead of a formula. This variable must contain the actual formula for calculating the image name. Using this technique if your formula is over 255 characters (a variable may contain an unlimited number of characters) or if the formula needs to change under different conditions.
So in your case, you want to leave off the @ symbol. Your fgVideoMedia1 variable doesn’t contain a formula, it is the formula.
Well, if you’re not going to read them all, I guess that means I don’t have to write them all. I’m good with that!
I used to know a guy named Mark. Great guy. I should go visit him someday – haven’t seen him in a couple of years, even though he only lives 89 miles away. I heard he had a very cute grandkid.