Bug in fxScript causes fault in 'Scrolling Text' generator

Posted by Alex4D 
Bug in fxScript causes fault in 'Scrolling Text' generator
October 28, 2008 08:46PM
If you want to use the '*' character to create centred, movie-style closing credits, you cannot use any character with an ASCII value above 127 on the left-hand side of your credit list. If you do, the position of the * is determined incorrectly meaning that the centering doesn't work, a character vanishes and the * remains.

This due to a bug in the 'FindString' fxScript function.

The only likely 8-bit ASCII character you'll want to use is the possessive closing apostrophe (as in "Barry?s Mum"winking smiley. There are two workarounds: use a neuter apostrophe, or create a custom font for your credits that has the correct apostrophe in ASCII position 35. If you know how to do that, you probably won't be using the Scrolling Text generator, but it would be good if Apple fixed the bug in FindString


In fact, if you use
£££££££££££££To the left*To the right
as your text in 'Scrolling Text' you get a 'FX Script Error - Out of Range' in your generator!

If you are scripting, if you are using FindString to find a single character, you can use the following routine instead:
Quote

on myFindChar(string stringToSearch, string charToFind)
float pos, stringLocation
string chartotest

stringlocation = kUndefined

pos = length(stringToSearch)
repeat while (pos > 0)
pos = pos - 1
CharsOf(stringToSearch, pos, pos+1, chartotest)

if (chartotest == charToFind)
stringLocation = pos
end if
end repeat

return(stringLocation)
End

Which you use with the following snippet:
Quote

index = myFindChar(curline, "*"winking smiley

...which looks in a string named curline for an asterisk and assigns it's position to the float named index.

Note that my programming is a little rusty, so this script might not be able to deal with every input possibility.

I'll post a fixed version of 'Scrolling Text' to
[alex4d.wordpress.com]

Alex Gollner
________________________________________________________________________
freelance film editor, london
Sorry, you do not have permission to post/reply in this forum.
 


Google
  Web lafcpug.org

Web Hosting by HermosawaveHermosawave Internet


Recycle computers and electronics