-- USE LOCALIZED STRING -- -- -- © January 2001, James Newton -- -- Use with #button, #field and #text sprites. Requires the -- "Localization" Movie Script property stringSymbol -- SPRITE EVENT -- on beginSprite(me) localizedString = sendSprite(0, #GetLocalizedString, stringSymbol) if stringP(localizedString) then sprite(me.spriteNum).member.text = localizedString end if end beginSprite -- BEHAVIOR DESCRIPTION AND PARAMETERS -- on isOKToAttach(me, spriteType, spriteNumber) if spriteType = #graphic then memberType = sprite(spriteNumber).member.type return [#button, #field, #text]getPos(memberType) else return FALSE end if end isOKToAttach on getPropertyDescriptionList(me) propertiesList = [:] symbolData = [ \ #comment: \ "Localized string symbol"&RETURN&\ "(See ""E&"Localization""E&" Movie Script for details)", \ #format: #symbol, \ #default: #stringSymbol \ ] -- Check if the "Localization" behavior is configured to return the -- list of the registered string symbols symbolsList = sendSprite(0, #GetStringSymbolsList) if ilk(symbolsList) = #list then symbolData[#range] = symbolsList symbolData[#default] = symbolsList[1] end if propertiesList[#stringSymbol] = symbolData return propertiesList end getPropertyDescriptionList on getBehaviorTooltip(me) return \ "Attach to #button, #field or #text sprites in "&RETURN&\ "order to display a localized text on beginSprite."&RETURN&RETURN&\ "This behavior requires the ""E&"Localization""E&RETURN&\ "Movie Script in order to function." end getBehaviorTooltip on getBehaviorDescription(me) return \ "USE LOCALIZED STRING"&RETURN&RETURN&\ "Attach to #button, #field or #text sprites in order to display a localized text on beginSprite."&RETURN&RETURN&\ "This behavior requires the ""E&"Localization""E&" Movie Script in order to function." end getBehaviorTooltip