I want the user to be able to switch languages anytime during the movie by pressing either an ENGLISH or PORTUGUESE button (which willl always be shown).
The main movie is pretty simple, 4 main nav buttons (paintings, info, photos, etc). The subnav will load external swfs or jpgs into the main movie.
Anyhow, I am more of a designer and am only starting to discover actionscript. I think I have to define a global Lang variable on each text box, then do an “if , then” statement with the language buttons, but I have NO idea where or how to do this. Any help would be greatly appreciated. Thanks.
1.make all the textfields you want to change dynamic and assign a variable name to each.
2.make one txt file with all the variables and their english text, another with the same for portugese (example: &myFirstButton=Info&mySecondButton=Contact&myTitle=whatever in one fole, then &myFirstButton=Infomacioa&… (sorry, i don’t speak any portugese, lol…just make sure the variables are the same in both txt files and correspond to the textfields in your fla)
3. button English: on release, loadVariables “english.txt”
4. button portugese: imagine…
of course, you don’t need txt files to load in, it’s just easier to change if you need to, else just hardcode the variable values in the fla…
There you go. That’s fine for loading in dynamic content, but the if, else statements are there if you want something loaded or moved depending on the language set.
yeah, use both of those options… use the second to change any content you may have in text fields - although it doesnt sound like youll be loading much outside text… so use the first option with any flash elements. ex if you have a MC that is a bit of text have two frames of text one english and one portugese, then use the method described above to switch between these frames based on what the use selects.
Peace
Creating engaging and entertaining content for designers and developers since 1998.