Brian Lin
asked on
PHP and Flash Q
Hi, Experts:
I made a Flash game that connect to the database ( myAdminSQL, also PHP ) but it is weird the database can only work on Mac's browsers and Windows Netscape, looks like the database does not work or connect on windows IE browser. Is this because somethiing wrong with my script ? or else ?
thanks
I made a Flash game that connect to the database ( myAdminSQL, also PHP ) but it is weird the database can only work on Mac's browsers and Windows Netscape, looks like the database does not work or connect on windows IE browser. Is this because somethiing wrong with my script ? or else ?
thanks
ASKER
ok, let me see....actually, there are many, this one is important -- [ send_lv.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/toy.php", get_lv, "get"); ]--
function checkAnswer(which) {
selectedAnswer = Number(which["num_txt"].te xt);
if (selectedAnswer == solution) {
disNumber = solution;
grab.gotoAndPlay("begin");
gotoAndStop("pass_1");
_parent._parent.attachGood .attachMov ie("youare verygood", "verygoodsign", 299);
//recording to database
var send_lv = new LoadVars();
var get_lv = new LoadVars();
// Attach some variables to send_vars these will be sent to the server
trace("toy_chance:"+1);
send_lv.toy_chance = "1";
//send_lv.toy_level = "";
send_lv.id = _global.user_id;
// Set up an onLoad function to receive variables
get_lv.onLoad = function() {
if (this.checkdone == 1) {
gotoAndStop("xxx");
_parent._parent.level_mc.u nloadMovie ();
} else {
gotoAndStop("xxx");
}
// end if checkdone
};
// Send and load variables from the server
send_lv.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/toy.php", get_lv, "get");
} else {
trace("Wrong");
_parent._parent.attachBad. attachMovi e("tryAgai n", "tryAgainSign", 289);
}
}
function checkAnswer(which) {
selectedAnswer = Number(which["num_txt"].te
if (selectedAnswer == solution) {
disNumber = solution;
grab.gotoAndPlay("begin");
gotoAndStop("pass_1");
_parent._parent.attachGood
//recording to database
var send_lv = new LoadVars();
var get_lv = new LoadVars();
// Attach some variables to send_vars these will be sent to the server
trace("toy_chance:"+1);
send_lv.toy_chance = "1";
//send_lv.toy_level = "";
send_lv.id = _global.user_id;
// Set up an onLoad function to receive variables
get_lv.onLoad = function() {
if (this.checkdone == 1) {
gotoAndStop("xxx");
_parent._parent.level_mc.u
} else {
gotoAndStop("xxx");
}
// end if checkdone
};
// Send and load variables from the server
send_lv.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/toy.php", get_lv, "get");
} else {
trace("Wrong");
_parent._parent.attachBad.
}
}
ASKER
also this one ........
//LEVEL CHECK
levelCheck = new LoadVars();
levelCheck.id = _global.user_id;
levelCheck.onLoad = function() {
if (levelCheck.toy_chance == 0) {
//attach movie clips
level_mc.attachMovie("leve l0", "0", 1);
toy_mc.toy_inner_clip.goto AndStop("g ame_1");
toy_intro_attach.attachMov ie("toy_in tro", "ToyIntroductionMovie", 99);
} else if (levelCheck.toy_chance == 1) {
//level_mc.attachMovie( "level1", "1", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_2");
} else if (levelCheck.toy_chance == 2) {
//level_mc.attachMovie( "level2", "2", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_3");
} else if (levelCheck.toy_chance == 3) {
//level_mc.attachMovie( "level3", "3", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_4");
} else if (levelCheck.toy_chance == 4) {
//level_mc.attachMovie( "level4", "4", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_5");
} else if (levelCheck.toy_chance == 5) {
//level_mc.attachMovie( "level5", "5", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_6");
} else if (levelCheck.toy_chance == 6) {
//level_mc.attachMovie( "level6", "6", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_7");
} else if (levelCheck.toy_chance == 7) {
//level_mc.attachMovie( "level7", "7", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_8");
} else if (levelCheck.toy_chance == 8) {
//level_mc.attachMovie( "level8", "8", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_9");
}
};
levelCheck.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/check_levels.php", levelCheck, "GET");
//LEVEL CHECK
levelCheck = new LoadVars();
levelCheck.id = _global.user_id;
levelCheck.onLoad = function() {
if (levelCheck.toy_chance == 0) {
//attach movie clips
level_mc.attachMovie("leve
toy_mc.toy_inner_clip.goto
toy_intro_attach.attachMov
} else if (levelCheck.toy_chance == 1) {
//level_mc.attachMovie( "level1", "1", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 2) {
//level_mc.attachMovie( "level2", "2", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 3) {
//level_mc.attachMovie( "level3", "3", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 4) {
//level_mc.attachMovie( "level4", "4", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 5) {
//level_mc.attachMovie( "level5", "5", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 6) {
//level_mc.attachMovie( "level6", "6", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 7) {
//level_mc.attachMovie( "level7", "7", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 8) {
//level_mc.attachMovie( "level8", "8", 1 );
toy_mc.toy_inner_clip.goto
}
};
levelCheck.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/check_levels.php",
If you are sending variables to the server,and the php script is sending variables back, then try using POST instead of GET.
billystyx
billystyx
ASKER
oh....let me try it.... but does GET works too ? just not as good as POST
ASKER
also...does "get" same as " GET " ?
ASKER
still not working on window....i will post script in Flash and PHP script too....
in the flash.....
// recording to database
var send_lv = new LoadVars();
var get_lv = new LoadVars();
// Attach some variables to send_vars these will be sent to the server
// trace( "carnival_chance:" + 1 );
// trace( "toy_level:" + 1 );
send_lv.carnival_chance = "1";
// send_lv.toy_level = "";
send_lv.id = _global.user_id;
// Set up an onLoad function to receive variables
get_lv.onLoad = function() {
if (this.checkdone == 1) {
gotoAndPlay("pass_1");
_parent._parent.attachGood .attachMov ie("youare verygood", "verygoodsign", 299);
_parent._parent.level_mc.u nloadMovie ();
} else {
gotoAndStop("xxx");
}
// end if checkdone
};
// Send and load variables from the server
send_lv.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/carnival.php", get_lv, "POST");
In the php........
<?php
require( 'db.php' );
//this script updates table math_db WHERE id = $_GET[id]
$carnival_chance = $_GET['carnival_chance'];/ /this grabs the posted variable character from flash
//$carnival_level = $_GET['carnival_level'];// this grabs the posted variable character from flash
$user_id = $_GET['id'];
$sql = "UPDATE math_db SET carnival_chance = '$carnival_chance' WHERE id = '$user_id'";
if (mysql_query($sql)) {
echo "&checkdone=1";
}
/*
$sql = "UPDATE math_db SET carnival_chance = '$carnival_chance', carnival_level = '$carnival_level' WHERE id = '$user_id'";
if (mysql_query($sql)) {
echo "&checkdone=1";
}
*/
/*
$query="SELECT * FROM math_db WHERE characters = '$n'";
$result=mysql_query($query );
$nr=0;
$nrows=mysql_num_rows($res ult);
while($row=mysql_fetch_arr ay($result ,MYSQL_ASS OC)){
$name[$nr]=($row['characte rs']);
$finallist=$finallist."&na meA".$nr." =".$name[$ nr];
$n++;
}
$finallist=$finallist."&nr ows=".$nro ws."&check done=1&";
print($finallist);
// Check number of rows returned
if ( mysql_num_rows( $result ) > 0 ) {
$message .= "&Status=Success recording Complete&CheckLog=1";
} else {
$message .= "&Status=Failure - Your guide was not recorded - Please try again";
}
echo $message;
*/
?>
in the flash.....
// recording to database
var send_lv = new LoadVars();
var get_lv = new LoadVars();
// Attach some variables to send_vars these will be sent to the server
// trace( "carnival_chance:" + 1 );
// trace( "toy_level:" + 1 );
send_lv.carnival_chance = "1";
// send_lv.toy_level = "";
send_lv.id = _global.user_id;
// Set up an onLoad function to receive variables
get_lv.onLoad = function() {
if (this.checkdone == 1) {
gotoAndPlay("pass_1");
_parent._parent.attachGood
_parent._parent.level_mc.u
} else {
gotoAndStop("xxx");
}
// end if checkdone
};
// Send and load variables from the server
send_lv.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/carnival.php", get_lv, "POST");
In the php........
<?php
require( 'db.php' );
//this script updates table math_db WHERE id = $_GET[id]
$carnival_chance = $_GET['carnival_chance'];/
//$carnival_level = $_GET['carnival_level'];//
$user_id = $_GET['id'];
$sql = "UPDATE math_db SET carnival_chance = '$carnival_chance' WHERE id = '$user_id'";
if (mysql_query($sql)) {
echo "&checkdone=1";
}
/*
$sql = "UPDATE math_db SET carnival_chance = '$carnival_chance', carnival_level = '$carnival_level' WHERE id = '$user_id'";
if (mysql_query($sql)) {
echo "&checkdone=1";
}
*/
/*
$query="SELECT * FROM math_db WHERE characters = '$n'";
$result=mysql_query($query
$nr=0;
$nrows=mysql_num_rows($res
while($row=mysql_fetch_arr
$name[$nr]=($row['characte
$finallist=$finallist."&na
$n++;
}
$finallist=$finallist."&nr
print($finallist);
// Check number of rows returned
if ( mysql_num_rows( $result ) > 0 ) {
$message .= "&Status=Success recording Complete&CheckLog=1";
} else {
$message .= "&Status=Failure - Your guide was not recorded - Please try again";
}
echo $message;
*/
?>
ASKER
and this is the database connect php code...change name and IP to xxx ......
<?php
mysql_pconnect( "xxx.xxx.xx.xxx", "xxx", "xxx" ) or die ( "Unable to connect to database!" );
mysql_select_db( "xxx" );
?>
<?php
mysql_pconnect( "xxx.xxx.xx.xxx", "xxx", "xxx" ) or die ( "Unable to connect to database!" );
mysql_select_db( "xxx" );
?>
ASKER
any comments ? :)
If you are using post in your flash script, you probably need to use post to collect the variables in the php too, like:
$_POST['yourvars'];
try this - past that I am not sure - I will try to look into it today:)
billystyx
$_POST['yourvars'];
try this - past that I am not sure - I will try to look into it today:)
billystyx
Also, can you post a link to the game on the web so I can take a look at that?
ASKER
let me send you the files...to your email address, so you can look them all
ASKER
Ok, please check the mail box, thanks :)
Thanks - I meant a link to the site where the game is. But I will take a look tonight at the flas etc. If you can upload them for others to check it might be best:)
ASKER
actually, other games are the same scripting... with the almost same php and script in the flash
http://www.brianlinstudio.com/learningNetwork
In this link, do you go to carnival and enter you name, and this is where the php script comes in?
If so, what should it do? I am using IE and it seems to log in OK.
billystyx
In this link, do you go to carnival and enter you name, and this is where the php script comes in?
If so, what should it do? I am using IE and it seems to log in OK.
billystyx
ASKER
Hi, billystyx
sorry did reply sooner, I set a log in name for you, go to the http://www.brianlinstudio.com/learningNetwork/kidarea and use "billystyx" to log in... then choose a guide, then choose top city only ( only that works )....in the town, click on the carnival game.... shoot some round, on the buttom, they should show what round you are playing, and when you click on back botton and back to town and re enter to carnival again, the game should start the last round you played...... so, now, the problem is game always start at very beginning and did not go to the last game user left..... mm, i explain well :) .... you can also try the Netscape to see the difference ! thanks
sorry did reply sooner, I set a log in name for you, go to the http://www.brianlinstudio.com/learningNetwork/kidarea and use "billystyx" to log in... then choose a guide, then choose top city only ( only that works )....in the town, click on the carnival game.... shoot some round, on the buttom, they should show what round you are playing, and when you click on back botton and back to town and re enter to carnival again, the game should start the last round you played...... so, now, the problem is game always start at very beginning and did not go to the last game user left..... mm, i explain well :) .... you can also try the Netscape to see the difference ! thanks
ASKER
by the way, it is http://www.brianlinstudio.com/learningNetwork/kidarea.html
ASKER
should said,... mm, i hope I explain well :)
Yes, I tried all that, it works fine in netscape (4.7), mozilla and Internet Explorer. I am not sure where the problem is.
On the first (I tested in mozilla) I went to the game and played to level3.
Then when I opened netscape and did the same it took me to level 3 straight away.
Then I went into IE and did the same (each one after logging out), and it took me to level3.
billystyx
On the first (I tested in mozilla) I went to the game and played to level3.
Then when I opened netscape and did the same it took me to level 3 straight away.
Then I went into IE and did the same (each one after logging out), and it took me to level3.
billystyx
ASKER
yes, but please try to play first at IE only , play 2 or 3 rounds, then come out to the " town " then back into the game again.... shoudl see the problem
no, i left on level 2 and it took me back (I selectred the back button and then clicked on the carnival again) and it returned me to level 2.
ASKER
really...mm....
out of interest, where does id get set, and how?
ASKER
Here is how....
var send_lv = new LoadVars();
var get_lv = new LoadVars();
// Attach some variables to send_vars these will be sent to the server
send_lv.user_name = Name;
// Set up an onLoad function to receive variables
get_lv.onLoad = function() {
if (this.CheckLog == 1) {
//set global variable for user_id
_global.user_id = this.id;
_global.character = this.character;
if (this.character<>"") {
gotoAndStop("mathtown2");
} else {
gotoAndStop("characters");
}
} else {
gotoAndStop("name_entry");
Status = this.Status;
}
// need to add skip for second time log in user, already with character in db
trace("receiving variables");
for (p in this) {
trace(p+":"+this[p]);
}
};
// Send and load variables from the server
send_lv.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/Login.php", get_lv, "GET");
var send_lv = new LoadVars();
var get_lv = new LoadVars();
// Attach some variables to send_vars these will be sent to the server
send_lv.user_name = Name;
// Set up an onLoad function to receive variables
get_lv.onLoad = function() {
if (this.CheckLog == 1) {
//set global variable for user_id
_global.user_id = this.id;
_global.character = this.character;
if (this.character<>"") {
gotoAndStop("mathtown2");
} else {
gotoAndStop("characters");
}
} else {
gotoAndStop("name_entry");
Status = this.Status;
}
// need to add skip for second time log in user, already with character in db
trace("receiving variables");
for (p in this) {
trace(p+":"+this[p]);
}
};
// Send and load variables from the server
send_lv.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/Login.php", get_lv, "GET");
so its not a cookie thing?
ASKER
no... actually, i try to record the screen shoot from my computer.... take a look... 1.7 mb total size..... http://www.brianlinstudio.com/question/Capture.avi
ASKER
or download @ http://www.brianlinstudio.com/question/Capture.avi.zip
ASKER
and it is weird, looks like when I log out and re log in, database has the record and game start at last I played..... but it just does not show record or start last game played while at game
I can't view that:(
ASKER
ok, I try a few time and I found that when I playing any game, the record did reocrd to the database. That is why when user re log in, game would start from last game played.... The problem is while in the game and user play from round 0 to 2, then back to town then re enter game.....there is script that will GET the information from database and should re direct the game to the last round played, so in this case, should direct to round 2.... i guess that script is not working.... and I did not show that script ... so, i will post below ...
**** For example, for the Carnival game... if the databse's carnival row shows = 2 then the following script should direct game to Part_3..... and in Windows IE, it is not working
//LEVEL CHECK
levelCheck = new LoadVars();
levelCheck.id = _global.user_id;
levelCheck.onLoad = function() {
if (levelCheck.carnival_chanc e == 0) {
carnival_mc.scorekeeper.go toAndStop( "part_1");
} else if (levelCheck.carnival_chanc e == 1) {
carnival_mc.scorekeeper.go toAndStop( "part_2");
} else if (levelCheck.carnival_chanc e == 2) {
carnival_mc.scorekeeper.go toAndStop( "part_3");
} else if (levelCheck.carnival_chanc e == 3) {
carnival_mc.scorekeeper.go toAndStop( "part_4");
} else if (levelCheck.carnival_chanc e == 4) {
carnival_mc.scorekeeper.go toAndStop( "part_5");
} else if (levelCheck.carnival_chanc e == 5) {
carnival_mc.scorekeeper.go toAndStop( "part_6");
} else if (levelCheck.carnival_chanc e == 6) {
carnival_mc.scorekeeper.go toAndStop( "part_7");
} else if (levelCheck.carnival_chanc e == 7) {
carnival_mc.scorekeeper.go toAndStop( "part_8");
} else if (levelCheck.carnival_chanc e == 8) {
carnival_mc.scorekeeper.go toAndStop( "part_9");
}
};
levelCheck.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/check_levels.php", levelCheck, "GET");
**** The following script is from check_level.php....
<?php
require( 'dB.php' );
//this script updates table math_db WHERE id = $_GET[id]
$user_id = $_GET['id'];
$sql = "SELECT toy_chance, carnival_chance, zoo_chance FROM math_db WHERE id = '$user_id'";
$query_result = mysql_query($sql);
$row = mysql_fetch_array($query_r esult);
echo "&toy_chance=$row[toy_chan ce]&zoo_ch ance=$row[ zoo_chance ]&carnival _chance=$r ow[carniva l_chance]& ";
?>
**** For example, for the Carnival game... if the databse's carnival row shows = 2 then the following script should direct game to Part_3..... and in Windows IE, it is not working
//LEVEL CHECK
levelCheck = new LoadVars();
levelCheck.id = _global.user_id;
levelCheck.onLoad = function() {
if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
} else if (levelCheck.carnival_chanc
carnival_mc.scorekeeper.go
}
};
levelCheck.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/check_levels.php",
**** The following script is from check_level.php....
<?php
require( 'dB.php' );
//this script updates table math_db WHERE id = $_GET[id]
$user_id = $_GET['id'];
$sql = "SELECT toy_chance, carnival_chance, zoo_chance FROM math_db WHERE id = '$user_id'";
$query_result = mysql_query($sql);
$row = mysql_fetch_array($query_r
echo "&toy_chance=$row[toy_chan
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oh, only on the PC's IE
ASKER
Hi
I wonder are there any way to re write the check_levels.php script.... same meaning but other way to write it...
======== Script in check_levels.php ========
<?php
require( 'db.php' );
//this script updates table math_db WHERE id = $_GET[id]
$user_id = $_GET['id'];
$sql = "SELECT toy_chance, carnival_chance, zoo_chance FROM math_db WHERE id = '$user_id'";
$query_result = mysql_query($sql);
$row = mysql_fetch_array($query_r esult);
echo"&toy_chance=$row[toy_ chance]&zo o_chance=$ row[zoo_ch ance]&carn ival_chanc e=$row[car nival_chan ce]&";
?>
======== Script in Flash ========
//LEVEL CHECK
levelCheck = new LoadVars();
levelCheck.id = _global.user_id;
levelCheck.onLoad = function() {
if (levelCheck.toy_chance == 0) {
//attach movie clips
level_mc.attachMovie("leve l0", "0", 1);
toy_mc.toy_inner_clip.goto AndStop("g ame_1");
toy_intro_attach.attachMov ie("toy_in tro", "ToyIntroductionMovie", 99);
} else if (levelCheck.toy_chance == 1) {
//level_mc.attachMovie( "level1", "1", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_2");
} else if (levelCheck.toy_chance == 2) {
//level_mc.attachMovie( "level2", "2", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_3");
} else if (levelCheck.toy_chance == 3) {
//level_mc.attachMovie( "level3", "3", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_4");
} else if (levelCheck.toy_chance == 4) {
//level_mc.attachMovie( "level4", "4", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_5");
} else if (levelCheck.toy_chance == 5) {
//level_mc.attachMovie( "level5", "5", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_6");
} else if (levelCheck.toy_chance == 6) {
//level_mc.attachMovie( "level6", "6", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_7");
} else if (levelCheck.toy_chance == 7) {
//level_mc.attachMovie( "level7", "7", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_8");
} else if (levelCheck.toy_chance == 8) {
//level_mc.attachMovie( "level8", "8", 1 );
toy_mc.toy_inner_clip.goto AndStop("g ame_9");
}
};
levelCheck.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/check_levels.php", levelCheck, "GET");
I wonder are there any way to re write the check_levels.php script.... same meaning but other way to write it...
======== Script in check_levels.php ========
<?php
require( 'db.php' );
//this script updates table math_db WHERE id = $_GET[id]
$user_id = $_GET['id'];
$sql = "SELECT toy_chance, carnival_chance, zoo_chance FROM math_db WHERE id = '$user_id'";
$query_result = mysql_query($sql);
$row = mysql_fetch_array($query_r
echo"&toy_chance=$row[toy_
?>
======== Script in Flash ========
//LEVEL CHECK
levelCheck = new LoadVars();
levelCheck.id = _global.user_id;
levelCheck.onLoad = function() {
if (levelCheck.toy_chance == 0) {
//attach movie clips
level_mc.attachMovie("leve
toy_mc.toy_inner_clip.goto
toy_intro_attach.attachMov
} else if (levelCheck.toy_chance == 1) {
//level_mc.attachMovie( "level1", "1", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 2) {
//level_mc.attachMovie( "level2", "2", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 3) {
//level_mc.attachMovie( "level3", "3", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 4) {
//level_mc.attachMovie( "level4", "4", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 5) {
//level_mc.attachMovie( "level5", "5", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 6) {
//level_mc.attachMovie( "level6", "6", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 7) {
//level_mc.attachMovie( "level7", "7", 1 );
toy_mc.toy_inner_clip.goto
} else if (levelCheck.toy_chance == 8) {
//level_mc.attachMovie( "level8", "8", 1 );
toy_mc.toy_inner_clip.goto
}
};
levelCheck.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/check_levels.php",
ASKER
one more Q.... Can I use levelCheck.sendAndLoad("http://www.brianlinstudio.com/learningNetwork/check_levels.php", levelCheck, "GET"); or should I use levelCheck.sendAndLoad("ch eck_levels .php", levelCheck, "GET"); ?
Second question:There shouldn't be a difference if both the php doc and the html page holding the swf are in the same directory on your server.
And for the first question, you can use POST instead of get, in the flash and in the php, and in the flash your onload function could use a switch statement instead of multiple if-elseif statements, which will make the code cleaner, but won't necessarily change the results.
billystyx
And for the first question, you can use POST instead of get, in the flash and in the php, and in the flash your onload function could use a switch statement instead of multiple if-elseif statements, which will make the code cleaner, but won't necessarily change the results.
billystyx
billystyx