|
Make a flash movie invisable on mose over
|
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> <script language="JavaScript"> ////////////////////////////////////////////////////// function show(object) { if (document.layers && document.layers[object] != null) document.layers[object].visibility = 'visible'; else if (document.all) document.all[object].style.visibility = 'visible'; } function hide(object) { if (document.layers && document.layers[object] != null) document.layers[object].visibility = 'hidden'; else if (document.all) document.all[object].style.visibility = 'hidden'; } ////////////////////////////////////////////////////// //--> </script> <STYLE TYPE="text/css"> <!-- .daPosition { position: relative; visibility: show; } //--> </STYLE>
</head> <body bgcolor="#FFFFFF"> <A HREF="#" onMouseover="hide('swf')"
Posted by: No name | website http:// |
MYSQL CLASS FOR AMFPHP ORIGINAL CLASS: "MySqlRS" | AUTHOR: "unknown" ( At least for me :-) ) MODIFIED BY FRANCISCO ARANDA (SHADOW) : faranda@allsolutions.cl : www.allsolutions.cl : 2006 Improvements: -Returns the result as an array in any function you define for it. -Each position in the returned array is an object with the names of the mysql table columns retuned by the mysql query as attributes THIS IS THE PHP SERVICE FOR AMFPHP SAVE AS AllMysql.php in services folder of amfphp directory <? php /* THIS CODE STARTS HERE --------------------------------------- AllMysql.php MYSQL CLASS FOR AMFPHP ORIGINAL CLASS: "MySqlRS" | AUTHOR: "unknown" ( At least for me :-) ) MODIFIED BY FRANCISCO ARANDA (SHADOW) : faranda@allsolutions.cl : www.allsolutions.cl : 2006 Improvements: -Returns the result as an array in any function you define for it. -Each position in the returned array is an object with the names of the mysql table columns retuned by the mysql query as attributes */ class AllMysql { var $dbhost = ""; var $dbuser = ""; var $dbpass = ""; var $dbname = ""; function AllMysql() { $this -> methodTable = array ( "dbReceiveData" => array ( "description" => "Returns an array of the sent query incluiding the column name in the result. \nMethod: \ndbReceiveData(\"QUERY\"[, \"DB_NAME\", \"DB_HOST\", \"DB_USER\", \"DB_PASS\"]) \n\nEx. \ndbReceiveData(\"SELECT * FROM news ORDER BY date\"[, \"db_name\", \"localhost\", \"user\", \"password\"]) \n You should specify DB_NAME, DB_HOST, DB_USER, DB_PASS in the class, but if you dont, you can send them as parameters", "access" => "remote", "returns" => "array", "arguments" => array("query" => array("type" => "string", "required" => true), "dbname" => array("type" => "string", "required" => false), "dbhost" => array("type" => "string", "required" => false), "dbuser" => array("type" => "string", "required" => false), "dbpass" => array("type" => "string", "required" => false)) ), "dbSendData" => array ( "description" => "Send data to the db (add, modify, update... NOT select).\nMethod: \ndbSendQuery(\"QUERY\"[, \"DB_NAME\", \"DB_HOST\", \"DB_USER\", \"DB_PASS\"]) \n\nEx: \ndbSendQuery(\"UPDATE news SET date = '2006-12-16' WHERE ID = 0 LIMIT 1 ;\"[, \"db_name\", \"localhost\", \"user\", \"password\"])", "access" => "remote", "returns" => "boolean", "arguments" => array("query" => array("type" => "string", "required" => true), "dbname" => array("type" => "string", "required" => false), "dbhost" => array("type" => "string", "required" => false), "dbuser" => array("type" => "string", "required" => false), "dbpass" => array("type" => "string", "required" => false)) ) ); } function dbReceiveData($query,$dbname='',$dbhost='',$dbuser ='', $dbpass='') { $dbname = ($dbname == '') ? $this->dbname : $dbname; $dbhost = ($dbhost == '') ? $this->dbhost : $dbhost; $dbuser = ($dbuser == '') ? $this->dbuser : $dbuser; $dbpass = ($dbpass == '') ? $this->dbpass : $dbpass; $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error); mysql_select_db($dbname) or die(mysql_error); $query_ris = mysql_query($query, $conn); $noFields = mysql_num_fields($query_ris); $fields = array(); for ($i = 0; $i < $noFields; $i++) { $fields[$i] = mysql_field_name($query_ris, $i); } return (array($query_ris,$fields)); mysql_free_result($query_ris); mysql_close(); } function dbSendData($query,$dbname='',$dbhost='',$dbuser='' , $dbpass='') { $dbname = ($dbname == '') ? $this->dbname : $dbname; $dbhost = ($dbhost == '') ? $this->dbhost : $dbhost; $dbuser = ($dbuser == '') ? $this->dbuser : $dbuser; $dbpass = ($dbpass == '') ? $this->dbpass : $dbpass; $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error); mysql_select_db($dbname) or die(mysql_error); if(!mysql_query($query)) return false; else return true; // If the query is executed it returns TRUE, else it returns FALSE. mysql_close(); } } /* THIS CODE ENDS HERE --------------------------------------- */ ? > THIS IS THE ACTIONSCRIPT 2.0 CLASS SAVE AS /* THIS CODE START HERE --------------------------------------- AllMysql.as MYSQL CLASS FOR AMFPHP ORIGINAL CLASS: "MySqlRS" | AUTHOR: "unknown" ( At least for me :-) ) MODIFIED BY FRANCISCO ARANDA (SHADOW) : faranda@allsolutions.cl : www.allsolutions.cl : 2006 Improvements: -Returns the result as an array in any function you define for it. -Each position in the returned array is an object with the names of the mysql table columns retuned by the mysql query as attributes */ import mx.remoting. *; import mx.rpc. *; class AllMysql { public var defaultGatewayURL = "http://localhost/remoting/gateway.php"; public var gatewayURL:String; private var conn:Connection; private var serv1:Service; private var serv:NetServiceProxy; private var servList : NetServiceProxy; public var db : String; public var host : String; public var user : String; public var pass : String; function AllMysql (db, host, user, pass,gatewayURL) { mx.remoting.debug.NetDebug.initialize (); NetServices.setDefaultGatewayUrl (gatewayURL); this.conn = NetServices.createGatewayConnection (); this.db = db; this.host = host; this.user = user; this.pass = pass; this.gatewayURL = gatewayURL == undefined ? defaultGatewayURL : gatewayURL; } function getDbData (db_query : String,responde:Function) : Void { var respuesta : Object = new Object (); respuesta.dbReceiveData_Result = function (data) { var rs:Array = data; var values:Array = rs[0]; var column:Array = rs[1]; var array:Array = new Array(); for (var pos = 0; pos < values.getLength (); pos ++) { array[pos] = new Object (); for (var nom = 0; nom < column.length; nom ++){ array[pos][column[nom]] = values.getItemAt(pos)[column[nom]]; } } responde(array); } serv = this.conn.getService ("mysql", respuesta); serv.dbReceiveData (db_query, this.db, this.host, this.user, this.pass); } function sendDbData (db_query : String, db_name : String, db_host : String, db_user : String, db_pass : String, responde:Function) : Void { var respuesta : Object = new Object (); respuesta.dbSendData_Result = function (data) { var rs:Boolean = data; responde(rs); } serv = this.conn.getService ("mysql", respuesta); serv.dbSendData (db_query, this.db, this.host, this.user, this.pass); } } /* THIS CODE ENDS HERE --------------------------------------- */ USAGE: THIS CODE SHOULD BE PLACED IN YOUR FLA /* THIS CODE STARTS HERE --------------------------------------- Put this code in your fla MYSQL CLASS FOR AMFPHP ORIGINAL CLASS: "MySqlRS" | AUTHOR: "unknown" ( At least for me :-) ) MODIFIED BY FRANCISCO ARANDA (SHADOW) : faranda@allsolutions.cl : www.allsolutions.cl : 2006 Improvements: -Returns the result as an array in any function you define for it. -Each position in the returned array is an object with the names of the mysql table columns retuned by the mysql query as attributes */ //var AllMysql = new AllMysql ('db_name', 'd_host', 'db_usr', 'db_pass', 'amfphpGatewayURL'); var AllMysql = new AllMysql ('mydb', 'localhost', 'root', '', 'http://localhost/remoting/gateway.php'); //AllMysql.getDbData("SQL QUERY",function to call when query is done); AllMysql.getDbData ("SELECT column1,column2,column3 FROM myTable", MyFunction); function MyFunction(rs) { //function called, the parameter of this function contains an array of mysql result for (i in rs) { //each position in the array is an object with the name of the mysql table column as attribute :-) //trace (rs[i].myTableColumnName); trace (rs[i].column1); trace (rs[i].column2); trace (rs[i].column3); //And this is supouse that will help to do more easy you job. } }; /* THIS CODE ENDS HERE --------------------------------------- */ Posted by: Francisco Aranda | website http://www.allsolutions.cl |
on (release) {
getURL ("javascript:window.print()");
}
on (release) {
if ($version !="") {
print ("text","bframe");
}
}
version is to make sure the person as an up todate player that can print........... bframe prints what ever is on that frame and that frame only.....the frame is used for the bounding box.... bmovie can be used to print on the main time line where the movie size is used as the bounding box, bmax uses all frames in the main timeline and uses the max bounding box. Posted by: No name | website http:// |
I contacted Macromedia a few weeks back with a note about how I'd discoverred it
is in fact possible to load an image or SWF file from a user's hard drive via a
web-based SWF provided you know the path:
/*
Load a SWF or JPEG from the local HDD into a SWF
Experiment by Jesse Stratford, jesse@actionscript.org
*/
loadMovie("file:///C|/tmp/image.jpg","_root.image");
loadMovie("file:///C|/tmp/flash.swf","_root.swf");
The most interesting thing about this is that you can also read variables
from the SWF and send them to server side scripts which can record/manipulate them.
I see applications for this for web-based games and the like.
Just thought I'd let you all know in case you are interested.
Posted by: Jesse Stratford | website http://www.actionscript.org/ |
//how to center a pop up via flash?
//in javascript u can take the screen width and height
//make a var of your flash and in a param flashvars take the screen width and height into 2 vars->
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
<!--
var recup = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
+ 'width="300" height="500"'
+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">'
+ '<param name="movie" value="eclair.swf">'
+ '<param name="quality" value="high">'
+ '<param name="bgcolor" value="#000000">'
+ '<param name="FlashVars" value="toto='+self.screen.width+'&tata='+self.screen.height+'">'
+ '<embed src="eclair.swf"'
+ 'quality="high"'
+ 'bgcolor="#000000"'
+ 'Flashvars="toto='+self.screen.width+'&tata='+self.screen.height+'"'
+ 'pluginspage="http://www.macromedia.com/go/getflashplayer"'
+ 'type="application/x-shockwave-flash"'
+ 'width="300" height="500">'
+ '</embed>'
+ '</object>';
document.write(recup);
// -->
</script>
//in flash you must do check every time the vars v and h
//this exemple centering the pop up open by flash ^^
_root.onEnterFrame = function() {
v = (_root.tata/2);
h = (_root.toto/2);
};
//now make the opening pop up function like ->
Movieclip.prototype.newWin = function(url, width, height, xPos, yPos, name) {
getURL("javascript:window.open('"+url+"','"+name+"','width="+width+",height="+height+",screenX="+xPos+",screenY="+yPos+",left="+xPos+",top="+yPos+",scrollbars=no');void(0);");
};
//and call
Mymc.onRelease = function() {
newWin("index.html", 500, 500, h, v, "cc");
};
Posted by: adrien dufond | website http://www.e-mergency.net |

