View Full Version : php to flash
jazzman121
May 19th, 2003, 07:16 PM
in a php file... how do i pass a command to a flash file???
like in the php file
if ( condition ) {
tell a button in flash to be enabled.... ( eg. _root.prev.enabled = true; )
}
in php how do i do this??? how do i pass a actionscript command to the flash file?
ahmed
May 19th, 2003, 07:43 PM
Use this script:
<?php echo 'buttonIsEnabled=true'; ?>and load it into Flash:
lv= new LoadVars()
lv.onLoad = function(success) {
if(success) {
_root.prev.enabled = this.buttonIsEnabled
} else {
trace("failed loading file")
}
}
lv.load("myScript.php")I think that should do it :)
jazzman121
May 19th, 2003, 08:51 PM
dint work
this is my php file...
<?php
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
echo 'buttonIsEnabled=true';
exit;
}
}
?>
and in flash the text file shows ....
No More enries buttonIsEnabled=true
dont know why its showing that :-S
ahmed
May 19th, 2003, 10:12 PM
use this then:
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
echo '&buttonIsEnabled=true';
exit;
}
}
?> I'm not sure what 'textfile' youre talking about, and how does flash read it..
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.