all groups > flash actionscript > february 2006 >
You're in the

flash actionscript

group:

Grab a variable from ASP page



Grab a variable from ASP page BrianRKoch
2/7/2006 9:47:51 PM
flash actionscript: Is there any way to grab the value of a variable on the actual page the SWF is
sitting on?

In other words, let's say I have my SWF on index.asp. At the top of index.asp
I define a variable, let's say:
<%
dim myVariable
myVariable = "123abc"
%>

Any way for the SWF to get the value of myVariable at runtime...?
(I'm 99.9% the answer is a big fat no, but I just thought I'd ask...)



Re: Grab a variable from ASP page blemmo
2/7/2006 10:32:50 PM
Good you left 0.1%... ;)
Yes, it is possible: just add the variable to the html source tags:
<param name="movie" value="the.swf?myVariable=123abc" />
and get it in Flash via _level0.myVariable.

For more info click
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.htm?hr
ef=00001205.html.

cheers,
blemmo
AddThis Social Bookmark Button