Stack Multi Lingual Stack 2 cards; 2 backgrounds. "function ExtractFileName FileName put "":"" into Delimiter if Delimiter is in FileName then repeat with CharPos = length(FileName) down to 1 if char CharPos of FileName = Delimiter then return char CharPos+1 to length(FileName) of FileName end repeat return empty else return FileName end ifend ExtractFileNamefunction ExtractPathName FileName put "":"" into Delimiter repeat with CharPos = length(FileName) down to 1 if char CharPos of FileName = Delimiter then return char 1 to CharPos of FileName end repeat return emptyend ExtractPathNameon closeStack global currwindow if there is a window currwindow then close window currwindowend closeStack"
Background 1 QTMovie 1 card; 1 background button; 1 background field. "on openCard if the id of this card is not in the short name of this card then put the short name of this card into field cardName end if pass openCardend openCardon closeCard if there is a cd field ""help text"" then hide cd field ""help text"" end if pass closeCardend closeCard"
Background button 1 Pick A File Visible. "on mouseUp answer file ""Pick a Movie File:"" of type ""MooV"" if it is not empty then put it into bg field filenameend mouseup"
Card 1 of background 1: QTMovie (card 1) card id 2944 1 card button; 3 card fields. "on SelectLanguage put ""English,French,German,Spanish,Japanese"" into languages repeat with i = 1 to the number of items in languages put item i of languages into btnName set hilite of btn btnName to false end repeat set hilite of the target to true if there is a window currwindow then end ifend SelectLanguage"
Card button 1 Open Movie Visible. "on mouseUp global currwindow if there is a window currwindow then close window currwindow QTMovie OpenMovie, TallWindoid, bg field fileName, ""165,40"", loop get the result if it is not empty then answer it exit mouseUp end if put ExtractFileName(bg field filename) into currwindow global languages, languageCodes put empty into languages put the movieLanguages of window currWindow into languageCodes repeat with i = 1 to the number of items in languageCodes put line (item i of languageCodes + 1) of cd field langNames ¬ of card ""langCard"" into lang put lang into line i of languages end repeat put languages into cd field ""language choices""end mouseUp"
Card field 1 Language Choices Visible. "On SelectLine n put the number of chars in line 1 to n of me + 1¬ into pos2 put pos2 - the number of chars in line n of me ¬ into pos1 select char pos1 to pos2 of meend SelectLineon mouseUp global currwindow, languageCodes put word 2 of the clickLine into lineNum if lineNum <= the number of lines in me then SelectLine lineNum if there is a window currwindow then set movieLanguage of window currWindow to ¬ item lineNum of languageCodes end if end ifend mouseUp"