Passing php variables to flash

Hello!

I have been working on this issue awhile and am stumped… I have tried several forums and haven’t gotten a response…

I need to pass the following php information into flash…

<?php
defined( ‘_VALID_MOS’ ) or die( ‘Direct Access to this location is not allowed.’ );
$link = “<img src ="$mosConfig_live_site/images/comprofiler/tn”;
$link_gallery = “<img src ="$mosConfig_live_site/images/comprofiler/”;
$imagewidth = 76;
$imageheight = 76;
$setwidth = “width="$imagewidth"”;
$setheight = “height="$imageheight"”;
$limit == “20”;
$number = " 20";

echo "<center><table><tr>
";
$query = “SELECT user_id,avatar,hits FROM #__comprofiler WHERE avatarapproved=1 AND avatar IS NOT NULL ORDER BY hits DESC LIMIT $number”;
$database ->setQuery ($query);
$results = $database->loadObjectList();

foreach($results as $result){

if(preg_match(‘/(jpg)/’,$result->avatar)){
$query_name = "SELECT id,username FROM #__users WHERE id = ".$result->user_id;
$database ->setQuery ($query_name);
$usernames = $database->loadObjectList();
foreach($usernames as $username){
?>

<?php
$profileName = $link.$result->avatar.“"border="0" alt="member image"$setwidth$setheight/>
<br/>$username->username</a></div>$result->hits<hr/>
“;}
$profile .= “<div align="center"><a href="index.php?option=com_comprofiler&task=userProfile&user=”.$result->user_id.”">$profileName”;}
}
echo $profile;
echo"</table>
</center>";
?>

This php script displays the top 20 users from a database based on their hit count. The script passes their avatar (image), username and link, as well as total hits.

I wanted to create a flash file with one movieclip that would parse the php file and display the results in an i++ fashion, so that I could make changes to only one mc instead of 20, when needed.

I have tried making a dynamic text field an mc, and assigning the loadvars object to that mc… but can’t get any information to display… and I know the php file works like a charm.

I have been hitting my head against the wall with this problem for awhile now, and any help would be extremely appreciated!

:jail:

I’ve been working on this problem for quite awhile now… but I’m still stumped. I am unable to properly use the examples you all have given due to my lack of understanding in the area, and if someone can provide an example that works with the code I posted at the top of this thread, I will gladly give you 20 bucks through PayPal for your time… I really need help with this!

Thanks!

:slight_smile: