AndersStudio
10-30-2006, 06:53 PM
Hi.
I have a .swf that pulls a random testimonial from a database. I am programming a 'read more' link in this .swf. The link should pass the id of that random testimonial to a new .swf file.
on(press){
getURL("http://directory/testimonials_af.php?tid="+link, "POST");
}
testimonials_af.php contains another .swf that needs to retrieve the variable (tid) and load all the testimonials from the database, but show the one that was selected.
However, I have tried several loadVars functions to get this id and place into a variable in flash, but it doesn't seem to work.
I even tried to write the flashvars object in the php like this:
<? $tid = $_GET['tid']; ?>
<script type="text/javascript">
AC_FL_RunContent("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
"codebase","testimonials_af",
"width","600",
"height","300",
"id","single",
"movie","testimonials_af",
"quality","high",
"scale","exactfit",
"wmode","transparent",
"flashvars","tid=<? print("$tid"); ?>",
"bgcolor","#ffffff");
</script>
myVars = new LoadVars();
myVars.load("http://directory/testimonials_af.php", "GET");
_global.id = myVars.tid;
What am I doing wrong?
I have a .swf that pulls a random testimonial from a database. I am programming a 'read more' link in this .swf. The link should pass the id of that random testimonial to a new .swf file.
on(press){
getURL("http://directory/testimonials_af.php?tid="+link, "POST");
}
testimonials_af.php contains another .swf that needs to retrieve the variable (tid) and load all the testimonials from the database, but show the one that was selected.
However, I have tried several loadVars functions to get this id and place into a variable in flash, but it doesn't seem to work.
I even tried to write the flashvars object in the php like this:
<? $tid = $_GET['tid']; ?>
<script type="text/javascript">
AC_FL_RunContent("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
"codebase","testimonials_af",
"width","600",
"height","300",
"id","single",
"movie","testimonials_af",
"quality","high",
"scale","exactfit",
"wmode","transparent",
"flashvars","tid=<? print("$tid"); ?>",
"bgcolor","#ffffff");
</script>
myVars = new LoadVars();
myVars.load("http://directory/testimonials_af.php", "GET");
_global.id = myVars.tid;
What am I doing wrong?