Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Read url variable in flash 500 points Emergency

I need to know what actionscript i need to make this happen.

here is the link:
http://ljacksonenterprises.com/test.html?month=2006

I want flash to read the value of "month"

or just read "month"

I want people to be able to click on this link from their email and it sends them to my flash site test.html and the month value show up in a text field or the word "month" show up in the text filed

0
leronj23
Asked:
leronj23
2 Solutions
 
FLAASHERCommented:
check this .... will find ur answer there :


http://www.permadi.com/tutorial/flashVars/index.html



FLAASHER
0
 
leronj23Author Commented:
i really dont know how to use javascript. i need help
0
 
Aneesh ChopraCommented:
Hi,

here I have done a working sample for you with html and flash source.
download link:

to test, unzip all files in a folder,
run default.htm on browser with month as parameter
---------------
default.htm?month=october
-----------

NOTE: month is case-sensitive, all characters should be lowercase

Regards
Aneesh
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Aneesh ChopraCommented:
0
 
leronj23Author Commented:
i can not get it to work for me

http://ljacksonenterprises.com/test.html?month=2006

from my link above i just need it to show up in the space.
0
 
blue-genieCommented:
i didn't have a look at aneesh's file, so if i'm stepping on toes here, i'm sorry, but it's as simple as this....

embed your swf file in the html like this (don't use the normal publish options)

<body>
<script language="JavaScript" type="text/JavaScript">
<!--
document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '
+ 'WIDTH=780 HEIGHT=195><PARAM NAME=movie VALUE="footer.swf'+document.location.search+'">'
+ '<PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#CCCCCC>'
+ '<EMBED src="footer.swf' +document.location.search+'" '
+ 'quality=high bgcolor=#CCCCCC WIDTH=780 HEIGHT=195 '
+ 'TYPE="application/x-shockwave-flash" '
+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
+ '</EMBED></OBJECT>')
//-->
</script>
</body>


where i have footer.swf, simply replace it with your swf filename.

then in your flash file, access the variable via _level0.month,
so for example if you have a textfield where you want to display it then
mytextfield_txt.text = _level0.month

blu.
0
 
leronj23Author Commented:
Thank you both aneeshchopra, and blue-genie. You both are great.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now