|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to make "*.swf" understand which page I am opening?
Hello all,
I have this question: I want to make one flash movie that supports two languages. I want when I open the index page of each language to start the flash movie in that language. For example, when I write in the address: URL to start the English version but when I write URL to start the Spanish version and this with only one "*.swf". Can you help? Thank you in advance! NaDi I am using FlashMX |
|
#2
|
|||
|
|||
|
querysting kinda
if you've ever dealt with querystrings in server side scripting this should be a pretty easy process...this is however also something i have just learned recently...
if you specify the movie you are loading on that page like "bilingual.swf" all you have to do is append to the end of it stuff like "?language=spanish" or "?language=english" from then on "language" would be a variable as if declared in the movie...so you can just set textfields or whatever in the swf depending on the value of language...be sure to alter the movie you are calling in both locations it shows up where you embed it... so it would look like "mymovie.swf?language=spanish" or "mymovie.swf?language=english"...quite a handy piece of info i wish i knew a long time ago you can specify other values as well like... mymovie.swf?var1=10&var2=stuff&var3=3000 remember to url encode any special characters too
__________________
Delenda est Carthago |
|
#3
|
|||
|
|||
|
Thank you very much rob5408.
I am new in ActionScript. Can you tell me where in *.fla project to declare the variables? Thank you in advance! NaDi |
|
#4
|
|||
|
|||
|
flashvars
That is one way, but it's not as clean as FlashVars, which you can use to communicate with the new Flash player. Check it out: FlashVars.
__________________
I'm not impatient, I just have a low tolerance for boredom. |
|
#5
|
|||
|
|||
|
Is is possible to get the variables from the URL (of a PHP page that contains the SWF) instead of coding them in the OBJECT or EMBED tag?
Example: The "parent" flash page is "file.php?id=1"... Can flash load this variable as opposed to having to use "flash.swf?id=1"? Is this something FlashVars can do, and if so, is it compatable with all recent Flash players? |
|
#6
|
|||
|
|||
|
Flashvars can do that. It is a param of the object tag, and an attribute of the embed tag I believe. It works on most platforms/systems/players, but as for the specifics on that you may want to check the link I posted above. Once again, with flashvars you aren't doing fileName.swf?varName=something&.... etc etc, you're just passing a string into the parameter tag for Flashvars.
|
|
#7
|
|||
|
|||
|
Thanks for the quick response. I understand that FlashVars can be used in the object & embed tags as an alternative to the
.swf?variable=x option. What I really want to know is.... can the variable be pulled from the parent URL from WITHIN the flash movie itself.... some kind of command that basically says "load variables from the URL of this page" |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > How to make "*.swf" understand which page I am opening? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|