Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi language and menu questions

Status
Not open for further replies.

Fion

Vendor
Sep 25, 2003
50
US
Hi all, I am a beginner using flash, and I have a few questions for someone that is better in the know then I.
First, this is probably really simple, but I can't find any reference to it anywhere, how do I play a movie from inside a button instance? I have a button that when you mouse over it, a drop-down menu appears, and I need to know how to make it so when I click an option in the drop down menu, it plays an animation that is not contained in the button instance. Is it clear what I mean?

Second, I would like to be able to add multi language options to the site, like where it is in english by default, but when you click on a little brasilian flag, it changes to portuguese... is there a good way to do that? Or should I just make a different copy of everything in each language and then just make the apropriate one visible? That seems like alot of unenessary work...

Any help or links to tutorials that you could provid would be great. Thanks!
 
To make something play outside of a button you could create the animation as a movieclip, give the clip an instance name then use actionscript on the button to control the clip.

Code:
on(release){
myMovieClip.play();
}

To make things multilingual the best thing to do is keep your text for each language separate from the Flash movie itself - either as a .txt file, xml or in a database then load it into empty dynamic text fields in your movie using loadVars(). Then by changing a variable that acts as a language identifier you can pull the correct content when you need it:

Code:
lv=new LoadVars()
lv.onLoad=function(){
myDynamicTextField.text=this.dataFromDatabase;
} 
lv.language='eng'
lv.sendAndLoad('databaseScript.php',lv,'POST');

(this is a very basic example of how you could approach the problem by using a database)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top