PDA

View Full Version : Launching Event Object on next scene



hill_t
01-16-2002, 10:49 AM
I am trying to set things up where I have an Event Object that determines the text on a scene. I have this object set to be triggered on the scene before so that it can check the language and provide the appropriate text. The problem seems to be that the time is reset when the scene is changed and the text goes to the default. I am using this for an install so I need to allow the user to go between scenes and have the correct default text displayed based on the language. Does anyone have any ideas about how to do this?

Shawna
01-16-2002, 11:10 AM
I would suggest localizing your demo for each language that you would like to have.

You can look in the help file on steps to localize a demo, but I'll outline how to do it here for you.

Create your demo in your default language (probably English) and save demo.

You then want to Export all of the text in your demo. Go to the File menu and choose Demo Text | Export. This will create a .txt file that you can save on your computer.

After saving the .txt file, open it up in Notepad. This is where you will do all of the translating of you text into different languages.

Save the .txt file.

When you build the distribution of your demo, you must have a copy of this file in the same folder as the DemoShield Player (demo32.exe).

The demo will then use the text based on the language that the computer is running. If you want the user to be able to choose the language that they want to run the demo in, you can check the "Show Language Selection Dialog" box in the Demo | Properties menu under the Options tab.

I am attaching a sample demo that I have created and localized for English (US), French and German. This is just a basic demo that has Bitmap Buttons and Text Objects that say "English" or "French" or "German" based on the language run, but the demo.txt file is added so you can see how to set up the file to localize it.

I hope this helps.

hill_t
01-16-2002, 11:19 AM
Thanks for the response Shawna. I think I left out some information of what we are doing. We have several buttons that change the text based on the Mouse On/Off event. So in order to do that for four or five buttons to one text field on each scene we have to use RTF files. Currently my demo will display the correct language text for each Mouse On event but not for when the scene first loads. For text fields that are static and not changed by any events we have the language selection working fine just as you described. If this is unclear in any way please let me know and I will further clarify my situation. Thanks in advance for your help.

Shawna
01-16-2002, 11:27 AM
Is it possible for you to zip up your demo and attach it so that I can take a look at it? I think it would be easier for me to help you if I could see how you have the demo set up and exactly what is happening.

Thanks.

hill_t
01-16-2002, 01:23 PM
I've attached a zip file of my demo for you to look at. Let me know if you have any questions or problems. Thanks for the help!

Shawna
01-16-2002, 03:17 PM
Thanks for the demo. I took a look at it and here's what I found.

When using rtf files in localized demos, you need to import the rtf files by Reference. I noticed that you had embedded all of your English rtf files into the demo. So when DemoShield runs, it isn't even trying to look for the German files, it's just using the English ones.

What you need to do is remove all of the rtf files from your demo and reimport them by Reference. You only need to import one type, so you can import only the English files. Then, make sure that all of the rtf files in different languages have the same name. I noticed that, for example, you had one rtf file in your ENU folder named Additional Options.rft and in the DEU folder had a file called Additional OptionsDE.rtf. These should both have the same name.

Now, when DemoShield runs, it will look for the rtf files in the language specific folders and display the correct ones. If you do this, you shouldn't really need any Event Objects, because DemoShield will be looking for the rtf files based on the language of the machine and all should work correctly.

Please let me know if I haven't made any sense. :)

hill_t
01-16-2002, 03:58 PM
Thanks for the suggestion Shawna but it doesn't seem to fix my problem. Now it apears to always be displayed in English, even when on a German system. Do I have to move the German files to the English folder or some other location? I made sure they were all the same name but it only displays in English. I also noticed that after the Distribution Wizard runs it puts all of the English rtf files in the redist directory and we don't want a collection of rtf on the root of our install. Is this behavior different then what you saw? Can you see something that I may have done wrong? Thanks for your patience on this.

Shawna
01-17-2002, 01:12 PM
Ok, thanks for your patience. Here's the end result:

I deleted all of the Event and Variable Objects. You don't need them because DemoShield will be able to find the correct rtf file based on the language that the system is running. I then changed all of your actions that were triggering the Event Objects to a Set Contents Action to show the appropriate rtf file.

As far as directory structure, you need your DEU and ENG folders, which contain thier own dat files and rtf files. I noticed that some of your rtf files had slightly different names between the english and german versions. You need to make sure that each of the german rtf files has the exact same name as it's english counterpart, or DemoShield will not be able to find it. If the distribution wizard created copies of the english rtf files at the root, you can delete those. Just make sure all of the rtf and dat files are in the appropriate language folders.

Also, I got the correct rtf files to show, however some look off-center. This is becuase of the formatting differences between the german and english rtf files. In your german files you use carriage returns to create new lines, but in the english files there are no hard returns, just the word wrapping that Word did. This is causing the difference in appearances. I only altered the Main Menu Scene. I enlongated the Text Object so that the german text appears correct, but if you run the demo in english, part of the text is cut off. What you need to do is edit the rtf files so that they are formatted in the same way so that they will both display correctly when running the demo.

I am attaching the demo with the changes I have made. As I said, I only worked with the Main Menu Scene, but hopefully this is enough info to use with the rest of the demo.

hill_t
01-17-2002, 05:08 PM
Thank you for your help Shawna. I had to start back from the copy I had locally because we needed some of those Events for other reasons but looking at what you had started I was able to get everything working the way we wanted. Thanks for your help.