home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / QuickTimeƒ / MultiLingualExample / multiling Scripts Data < prev   
Encoding:
Text File  |  1992-02-07  |  3.2 KB  |  10 lines  |  [TEXT/MSWD]

  1. Item    Name    Props    Script
  2. 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 if end ExtractFileName function 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 empty end ExtractPathName on closeStack   global currwindow   if there is a window currwindow then close window currwindow end closeStack"
  3. 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 openCard end openCard on closeCard   if there is a cd field ""help text"" then     hide cd field ""help text""   end if   pass closeCard end closeCard"
  4. 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 filename end mouseup"
  5. 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 if end SelectLanguage"
  6. 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"
  7. 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 me end SelectLine on 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 if end mouseUp"
  8. Background 2    bkgnd id 4063    1 card; 0 background buttons; 0 background fields.    <No Background script>
  9. Card 1 of background 2: bkgnd id 4063 (card 2)    langCard    0 card buttons; 2 card fields.    <No Card script>
  10.