Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 30th, 2003, 01:58 AM
NaDi NaDi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 NaDi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old April 30th, 2003, 10:20 PM
rob5408 rob5408 is offline
Certified Genius
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: over there
Posts: 77 rob5408 User rank is Private First Class (20 - 50 Reputation Level)rob5408 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 46 m 57 sec
Reputation Power: 7
Send a message via AIM to rob5408
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

Reply With Quote
  #3  
Old May 7th, 2003, 02:20 AM
NaDi NaDi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 NaDi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old May 7th, 2003, 08:37 AM
mbritton72 mbritton72 is offline
Shrill Digital God
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Raleigh, NC
Posts: 64 mbritton72 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m
Reputation Power: 8
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.

Reply With Quote
  #5  
Old June 12th, 2003, 11:52 AM
tim_wright tim_wright is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 3 tim_wright User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #6  
Old June 12th, 2003, 02:24 PM
mbritton72 mbritton72 is offline
Shrill Digital God
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Raleigh, NC
Posts: 64 mbritton72 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m
Reputation Power: 8
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.

Reply With Quote
  #7  
Old June 12th, 2003, 03:16 PM
tim_wright tim_wright is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 3 tim_wright User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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"

Reply With Quote
  #8  
Old June 12th, 2003, 07:23 PM
mbritton72 mbritton72 is offline
Shrill Digital God
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Raleigh, NC
Posts: 64 mbritton72 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m
Reputation Power: 8
If you're refreshing the page, new Flashvars can be generated and read back into Flash.

docs


Mike

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > How to make "*.swf" understand which page I am opening?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway