By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

php vars to flash nightmare

P: n/a
Hello,

I realy need help,Searched the NG for a days with no vail.
Sorry for the long script.
I am trying to get a variable from php to flash. I have the following
code in php

<a href="artist_page.php?12345678=<?php echo
$row_rs_Q_Gender_to_Artist['Artist_ID']; ?>"><?php echo
$row_rs_Q_Gender_to_Artist['ArtistName']; ?></a>

This works fine getting the results from mysql, it like this on the
browser: artist_page.php?12345678=id number quried from dbase

Now, I have a flash in the same page that looks like this

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="340" height="350">
<param name="movie"
value="myflash.swf?artist_page.php?12345678=<?php echo
$row_Recordset1['ArtistID']; ?>">
<param name="quality" value="high">
<embed src="myflash.swf?artist_page.php?12345678=<?php
echo $row_Recordset1['ArtistID']; ?>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="340"
height="350"></embed></object>
flash button like this

on (release) {

getURL("http://win2000/echoben/artist_page.php?12345678="+$row_Recordset1['ArtistID']);

The results I get on the browser when I click the flash button
would not get the id number quried from dbase mysql.
I have tried Loadvarsnum
("http://win2000/echoben/artist_page.php?12345678="+$row_Recordset1['ArtistID',0,
"post"]); and get and bunch of ways I foung searching the internet and
NG but none works

Please shed some light and end my nightmare
your help is very much appreciated

DBen

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Note: I don't know Flash, so take my comments with a grain of salt.
In article <11**********************@f14g2000cwb.googlegroups .com>, Drisco wrote:
Hello,

I realy need help,Searched the NG for a days with no vail.
Sorry for the long script.
I am trying to get a variable from php to flash. I have the following
code in php

<a href="artist_page.php?12345678=<?php echo
$row_rs_Q_Gender_to_Artist['Artist_ID']; ?>"><?php echo
$row_rs_Q_Gender_to_Artist['ArtistName']; ?></a>

This works fine getting the results from mysql, it like this on the
browser: artist_page.php?12345678=id number quried from dbase

I trust 12345678 is not actually your variable name?
Now, I have a flash in the same page that looks like this

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="340" height="350">
<param name="movie"
value="myflash.swf?artist_page.php?12345678=<?php echo
$row_Recordset1['ArtistID']; ?>">


A few things here:

1- Like I said, I don't know Flash, but it seems odd that a tag like 'param'
would allow a URL as a possible value of the 'value' attribute. If it doesn't
expect a URL as a value, it's not going to go to that page at all.

2- Even if it does, I don't think
'myflash.swf?artist_page.php?12345678=anything' is a valid URL.

3- Does artist_page.php output some string that you're using as the query
string for myflash.swf? If so, could you make the code in artist_page.php into
a function and do something like this:

(in artist_page.php:)

<?php
function artist_page($12345678){

// code from artist_page.php, collecting output in $query_string;

return $query_string;
}
?>

(in your main page:)

<?php

include "artist_page.php";

$query_string = artist_page($row_rs_Q_Gender_to_Artist['Artist_ID']);

?>

and then your links to myflash.swf would be:
"myflash.swf?<?php echo $query_string; ?>"
That's the best I can give you with no knowledge of Flash.

-Reha
--
/(bb|[^b]{2})/ ...THAT is the question.
=======================================
http://www.stwing.org/~rsterbin
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.