hey, i looked at that and it just looks to complicated, i want to keep it simpleso that later on when i come back to it, it is not a scary site.....well anyways i've done the following...where i have a php script and then a flash file, in the php i have an array which i can get to flash but after that do not know what to do with it.....how do i split it up and maybe assign values to it so i can load each bit to a different part of the flash layout ive got?
PHP Code:
<?php
require_once("Connections/Connection.php"); // Database Connection
/////
$query = sprintf("SELECT * FROM clients");
$result = @mysql_query($query);
$row = @mysql_fetch_array($result);
/////
do{
$Username []=$row["Username"]."-";
}while ($row = mysql_fetch_array($result));
print_r($Username);
echo"&Username=$Username";
?>
flash code
Code:
onClipEvent (load) {
// first we make a new loadvars object to hold the variables that are being loaded from the php filr
Profiles=new LoadVars();
//this is the part where we execute the function that handles the loaded data
Profiles.onLoad=function(){
placeTheDataIntoTheRightPlace();//call the function
};
//here we load in the php file, make sure you set the right path to your file
Profiles.load("Profiles.php");
//this is the function that handles the data.
//the variables now sorta live in the loadVars object we set named myData
//So we can call em like myData.myVariableInthePhpPrintedString
//just look at the script and whatch carefullt how its being called and it should become clear to ya.
placeTheDataIntoTheRightPlace = function(){
_level0.b1.Username=Profiles.Username;
_level0.b2.Username=Profiles.Username;
_level0.b3.Username=Profiles.Username;
_level0.b4.Username=Profiles.Username;
_level0.b5.Username=Profiles.Username;
_level0.b6.Username=Profiles.Username;
_level0.b7.Username=Profiles.Username;
_level0.b8.Username=Profiles.Username;
_level0.b9.Username=Profiles.Username;
_level0.b10.Username=Profiles.Username;
}}
so basically i want flash to get the array and split into values and carry on putting them into each b1,b2 etc...also thats limited to ten, im going to have a next page, how can i do the same again but this time start from where i left off?