[f8] Mysql + Flash
I'm wanting the top 10 scores to display for a game I'm working on. I'm having trouble getting the information to display in a dynamic text box. I've been working on this for 2 days looking at examples and haven't had any luck. I don't know how to get more than one result to show in a dynamic text fields variable. I assume you can do it.Right now I am getting it to display the very last name in my database. It seems like I'm close, but there needs to be some minor adjustments or something. Could someone give me a suggestion on how to fix this?Here is my php:[CODE]<?php//connect to database $link = mysql_connect(localhost, username, password) or die("<b>error</b>: failed to connect to database");//select the name column $query = "SELECT name FROM coas.safety_scores"; $result = mysql_query($query) or die("<b>error</b>: failed to execute query <i>$query</i>");//print names to flash dynamic textbox variable, timer while ($desiredContent = mysql_fetch_array($result)) { $name=$desiredContent['name']; print "&timer=".$name; }?>[/CODE]Here is the actionscript:[CODE]onClipEvent (load) {var preVars = new LoadVars();preVars.action = 'preview';preVars.sendAndLoad("
Adobe > ActionScript 1 and 2
Posted on: 03/11/2008 08:05:16 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Export Querries From Flash 8 To MySQL And Import Data From MySQL
- Php,mysql And Flash- How To Display Picture In Flash From Mysql
- [FL8 + PHP + MySQL] Adding/Deleting/Viewing Content From MySQL Db
- PHP + Mysql Ind Flash 5
- Flash And MySQL
- Flash - Php - Mysql
- Flash MX And MySQL
- Flash And MySQL
- Flash And MySQL
- Flash MX + PHP/MySql
- HELP Flash, PHP And MySQL Db.
- Flash MX, PHP And MySQL.
- Flash MX, MySQL, ASP 2.0
- Flash PHP MYSQL HELP
- Flash+php+mysql
- Flash, Php And Mysql
- Flash And MySQL
- Flash MX + PHP + MySQL
- Flash To Php To MySql
- Flash And MySQL
- Flash Mx, Php, Mysql
- PHP, MySQL And FLASH
- MySQL - Flash MX
- Flash, PHP, And MySQL
- MySQL And Flash
- Mysql, Sql, Php, And Flash
- Flash Mx +php + Mysql?
- Flash MX And PHP & MySQL
- A Little Flash/MySQL Help...
- MySQL And Flash?
- Flash & Mysql
- Flash, PHP, MySQL
- Flash Php And Mysql
- MySQL In Flash
- Help Me.. Need A Little Help (Mysql, PHP And Flash)
- Flash, PHP & MySQL?
- PHP/MYSQL Flash
- Mysql -> Flash
- Flash And MySQL.
- Flash 8 / PHP / MySQL Help Please
- MySQL->PHP->FLASH
- PHP / Mysql And Flash
- [F8] Flash With PHP/MySql
- [CS3][AS3] Flash To PHP To MySQL
- Flash PHP XML And MySQL
- [CS3] Flash To MySql/php To Div
- Flash MySQL
- Flash And Mysql
- Mysql -> Flash
- Flash And Mysql
Export Querries From Flash 8 To MySQL And Import Data From MySQL
Hi friends,
I am making a web site for a customer and i need to import data from MySQL Database but i don't know how to do it.
I would appreciate it if somebody could give me an idea or tell me where to find a tutorial.
Also i heard that there is a .dll file that Macromedia made, in order to make it easier to connect Flash with Databases, is that true ?
Php,mysql And Flash- How To Display Picture In Flash From Mysql
How are you all?
I have a question for php,mysql and flash gurus.
Before I ask this question I will describe what I want briefly.
Using php, I retrieve a path to a picture from mysql and send it to flash movie as a variable.
Now what I would like to do is using this path to a picture how to display the picture as a part of a movie?
Cheers,
[FL8 + PHP + MySQL] Adding/Deleting/Viewing Content From MySQL Db
So... Viewing isn't actually the issue here, I just added it to make it a full triangle . I'm doing that with a PHP that writes the contents of the dB in XML syntax.
But, to make it clear, I am trying to develop an application that communicates with a MySQL database, via PHP. And you have the option to add/delete fields, but also in the Flash application.
I found some source at the gotoAndLearn forums, but it simply would not work! I am uploading a zip of the files. The main problem with this is that when I am adding something, the dB gets filled with blanks. This boggles my mind. Not being a big PHP knower (not knowing anything, really), my suggestion is that the variables don't get sent properly. But then again...
Some help with this please? I'm in a kind of a tight spot here, so some help would be really in handy!
Cheers
PHP + Mysql Ind Flash 5
Hey there, this is very important for me, so pleeeaaaaaseeeeee.....
I have a question concerning php4 and mysql.
Is there a possibility to use flash to get information or better to say databases from mysql and display, delete, change and use them through flash 5 in a swf-file (maybe as variables)?
And can I use php to write it into a mysql-database and use it in flash 5?
thanx a lot
jean3k
Flash - Php - Mysql
hi everybody,
i have a serious problem, and i would really appreciate if someone could give me some help.
I created a flash eCard application with the use of actionscript, php and mysql.
you can view the application at: http://www.acidvision.com/eflyer
in this application the user can login, create a fully customised eflyer and finally save it to a database or send it to an email address.
when the user clicks on the send button the variables are being saved to an mysql table with a unique id and a php url is created so the recipient can click on this url and view the flyer. So far so good.
Now the problem:
the recipient receives the message that he has a flashCard which can view under the url:
http://www.acidvision.com/eflyer/vie...p?flyerid=(the flyer id number generated by the send action.)
When the recipient clicks on this link, the webpage is loading normally, the variables are loading from the database, but THEY ARE NOT PASSED INTO THE FLASH MOVIE.
In this viewflyer.php file resides the flash movie which with a loadVariables function is trying to load the variables from the viewflyer.php
Here i have the php code i use for the view flyer.
<?
mysql_connect("localhost","","");
mysql_select_db("aveflyer");
$result=mysql_query("SELECT * FROM flyerssend WHERE flyerid='$flyerid'");
while ($row = mysql_fetch_array($result)){
$layerNumber = $row['layerNumber'];
$dragging = $row['dragging'];
$shapeAlpha = $row['valuesLayer1shapealpha'];
$shapeAlpha2 = $row['valuesLayer2shapealpha'];
$shapeAlpha3 = $row['valuesLayer3shapealpha'];
$xScale = $row['valuesLayer1xScale'];
$xScale2 = $row['valuesLayer2xScale'];
$xScale3 = $row['valuesLayer3xScale'];
$yScale = $row['valuesLayer1yScale'];
$yScale2 = $row['valuesLayer2yScale'];
$yScale3 = $row['valuesLayer3yScale'];
$xSkew = $row['valuesLayer1xSkew'];
$xSkew2 = $row['valuesLayer2xSkew'];
$xSkew3 = $row['valuesLayer3xSkew'];
$ySkew = $row['valuesLayer1ySkew'];
$ySkew2 = $row['valuesLayer2ySkew'];
$ySkew3 = $row['valuesLayer3ySkew'];
$melt = $row['valuesLayer1melt'];
$melt2 = $row['valuesLayer2melt'];
$melt3 = $row['valuesLayer3melt'];
$Spacing = $row['valuesLayer1Spacing'];
$Spacing2 = $row['valuesLayer2Spacing'];
$Spacing3 = $row['valuesLayer3Spacing'];
$ShapeRed = $row['valuesLayer1ShapeRed'];
$ShapeRed2 = $row['valuesLayer2ShapeRed'];
$ShapeRed3 = $row['valuesLayer3ShapeRed'];
$ShapeGreen = $row['valuesLayer1ShapeGreen'];
$ShapeGreen2 = $row['valuesLayer2ShapeGreen'];
$ShapeGreen3 = $row['valuesLayer3ShapeGreen'];
$ShapeBlue = $row['valuesLayer1ShapeBlue'];
$ShapeBlue2 = $row['valuesLayer2ShapeBlue'];
$ShapeBlue3 = $row['valuesLayer3ShapeBlue'];
$rotate = $row['valuesLayer1rotate'];
$rotate2 = $row['valuesLayer2rotate'];
$rotate3 = $row['valuesLayer3rotate'];
$xPosition = $row['valuesLayer1xPosition'];
$xPosition2 = $row['valuesLayer2xPosition'];
$xPosition3 = $row['valuesLayer3xPosition'];
$yPosition = $row['valuesLayer1yPosition'];
$yPosition2 = $row['valuesLayer2yPosition'];
$yPosition3 = $row['valuesLayer3yPosition'];
$matrix = $row['matrix'];
$matrix2 = $row['matrix2'];
$matrix3 = $row['matrix3'];
$shape = $row['shape'];
$shape2 = $row['shape2'];
$shape3 = $row['shape3'];
$bg = $row['bg'];
$bgR = $row['bgR'];
$bgG = $row['bgG'];
$bgB = $row['bgB'];
$zoom = $row['zoom'];
$layer1vis = $row['layer1Vis'];
$layer2vis = $row['layer2Vis'];
$layer3vis = $row['layer3Vis'];
$theL1Click = $row['theL1Click'];
$theL2Click = $row['theL2Click'];
$theL3Click = $row['theL3Click'];
print "&layerNumber=" . urlencode($layerNumber);
print "&dragging=" . urlencode($dragging);
print "&shapeAlpha=" . urlencode($shapeAlpha);
print "&shapeAlpha2=" . urlencode($shapeAlpha2);
print "&shapeAlpha3=" . urlencode($shapeAlpha3);
print "&xScale=" . urlencode($xScale);
print "&xScale2=" . urlencode($xScale2);
print "&xScale3=" . urlencode($xScale3);
print "&yScale=" . urlencode($yScale);
print "&yScale2=" . urlencode($yScale2);
print "&yScale3=" . urlencode($yScale3);
print "&xSkew=" . urlencode($xSkew);
print "&xSkew2=" . urlencode($xSkew2);
print "&xSkew3=" . urlencode($xSkew3);
print "&ySkew=" . urlencode($ySkew);
print "&ySkew2=" . urlencode($ySkew2);
print "&ySkew3=" . urlencode($ySkew3);
print "&melt=" . urlencode($melt);
print "&melt2=" . urlencode($melt2);
print "&melt3=" . urlencode($melt3);
print "&Spacing=" . urlencode($Spacing);
print "&Spacing2=" . urlencode($Spacing2);
print "&Spacing3=" . urlencode($Spacing3);
print "&ShapeRed=" . urlencode($ShapeRed);
print "&ShapeRed2=" . urlencode($ShapeRed2);
print "&ShapeRed3=" . urlencode($ShapeRed3);
print "&ShapeGreen=" . urlencode($ShapeGreen);
print "&ShapeGreen2=" . urlencode($ShapeGreen2);
print "&ShapeGreen3=" . urlencode($ShapeGreen3);
print "&ShapeBlue=" . urlencode($ShapeBlue);
print "&ShapeBlue2=" . urlencode($ShapeBlue2);
print "&ShapeBlue3=" . urlencode($ShapeBlue3);
print "&rotate=" . urlencode($rotate);
print "&rotate2=" . urlencode($rotate2);
print "&rotate3=" . urlencode($rotate3);
print "&xPosition=" . urlencode($xPosition);
print "&xPosition=" . urlencode($xPosition);
print "&xPosition2=" . urlencode($xPosition2);
print "&yPosition3=" . urlencode($yPosition3);
print "&matrix=" . urlencode($matrix);
print "&matrix2=" . urlencode($matrix2);
print "&matrix3=" . urlencode($matrix3);
print "&shape=" . urlencode($shape);
print "&shape2=" . urlencode($shape2);
print "&shape3=" . urlencode($shape3);
print "&bg=" . urlencode($bg);
print "&bgR=" . urlencode($bgR);
print "&bgG=" . urlencode($bgG);
print "&bgB=" . urlencode($bgB);
print "&zoom=" . urlencode($zoom);
print "&layer1vis=" . urlencode($layer1vis);
print "&layer2vis=" . urlencode($layer2vis);
print "&layer3vis=" . urlencode($layer3vis);
print "&theL1Click=" . urlencode($theL1Click);
print "&theL2Click=" . urlencode($theL2Click);
print "&theL3Click=" . urlencode($theL3Click);
}
mysql_close();
?>
<html>
<head>
<title>Preview</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/styles.css">
</head>
<BODY bgcolor="#FFFFFF">
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="795" HEIGHT="573" id="view" ALIGN="">
<PARAM NAME=movie VALUE="view.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="view.swf" quality=high bgcolor=#FFFFFF WIDTH="795" HEIGHT="573" NAME="viewflyer" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</BODY>
</html>
Is there something that I'm doing wrong?
thanks in advance
fotios
my mail is: fotis@freesurf.ch
Flash MX And MySQL
could somebody help me figuring out how to connect Flash MX with MySQL database? i have created a database in MySQL that contains information for car parts. what i would like to do is retrieving certain part information from this database (including an accompaniment image for that particular car part too)and having them display within my Flash MX movie when a button is clicked.
i know there are things involved such as PHP scripting to establish the connection between Flash and MySQL as well as creating an empty movie clip to hold the image. nevertheless, i'm still confused as how to get it to work?
thanks for your help!
Flash And MySQL
Hello guys.
Question:
I have transfer data form flash to MySQL and again to flash as soon as it possible:
Flash(text1 field)->MySQL (save “text1” in the database field “text” and return to flash as text2. We read this again from “text” field of database)->Flash
P.S. text1 and text2 field in the _root.charactermovie of cause.
Here is a flash-script for _root.charactermovie:
onClipEvent (enterFrame) {
loadVariables("text.php", "_root.charactermovie", "POST");
}
enterFrame event to cycle event of cause.
Php-script:
<?php
require( "function.php" );
$dbLink = mysql_connect( $dbHost, $dbUser, $dbPass );
dbConnect();
mysql_query( "UPDATE text SET text='$text1' where id = 1;" );
$result = mysql_query( "SELECT text FROM text where id='1'" );
$row = mysql_fetch_array( $result );
$text2=$row['text'];
echo "text2=".$text2;
?>
All is working, but… with such slow speed…it’s refresh in 1 sec or even worth.
Is there flash problem or is there mistake in my head? :-)
Regards,
Alex
Flash MX + PHP/MySql
Anyone have any experience linking an external mysql database to a Flash movie? Sample urls?
HELP Flash, PHP And MySQL Db.
I am in desperate need of help about my situation. I need to have a web page that has a flash with a gif. embeded in it. The images are generated at random from a MySQL database using PHP. I also need to display an animated text that corresponds to the image displayed. If any one out there can help, please.
Flash MX, MySQL, ASP 2.0
Hello!
I was just curious as to whether it were possible to run queries in Flash to MySQL using ASP as the server tech.
Cheers.
Flash+php+mysql
I need to insert and retrieve data from a mysql DB, the problem is when I’m listing data that as the character & flash assumes that as a new variable.
I could escape() the text before insert to de DB and the problem will be solved but I also need to have some html entities to make links in the text.
Suppose I have this text:
this is the example text fallowed by a link www.flashkit.com and some special characters & <b>bold</>
What I need:
Show the text exactly as you see it
Without making the bold
Without assume the character & as a new variable
Assuming the www.flashkit.com as a link
Any suggestions will be appreciated
Thanks
Flash, Php And Mysql
Well, according to the lack of tutorials (more like none whatsoever!) I have managed to achieve the impossible, MULTIPAGE FORMS ON FLASH.
At the moment, i have the data passed to php which sends me the results in the form of an email.
My question is,, since i know nothing about PHP, and my manual budget has been exceeded with the expenditure on flash bibles, does any one have an example of some code that i can put into an existing php file so that it passes the info to a MYSQL DB on my server.
for this example u can use the DB name FORMDATA. with ;
$name
$contact
$address
I would really appreciate the help
Flash And MySQL
Now, I know that flash can work with MySQL but it has to go through a php script in the process. Correct?
Can Flash communicate directly with MySQL.
Flash MX + PHP + MySQL
I know a bittle bit of all theese tools, but I have a problem making them work toghether.
if someone could make a *.fla and a *.php source that would do the following thing :
- in the flash movei I have a input text, a dynamic one and a button
- I write in the input a sql query and push the button
- the php script recives the command and executes it and returns to the same flash movie the results
- the flash movie displays the result in the dynamic text box.
please send me the *.fla and *.php sources at FenixSA_@hotmail.com.
Thankyou very-very much and please don't close/delete my thread because I didn't know where else to turn to..I found some tutorials on the net but I didn't understand all of the script..and I didn't try very hard to understand because the exemple files did'n work !!
Flash To Php To MySql
I have a flash movie where i want a user to submit their name and email address to the database.
Flash:
Name text field variable: name
Email text field variable: email
Go Button (Submit Button and it a movie on top of a movie)
on (release) {
Status = "Registration Done";
loadVariablesNum"../php/Register.php?name="+name",1, "POST");
gotoAndPlay(2);
}
PHP:
<?php
$Host="localhost";
$User="*****";
$Passwd="****";
$DBName="executiveentbiz_com_-_guestlist"
$TableName="glist";
$name="name";
$email="email";
mysql_connect($Host, $User, $Passwd);
mysql_select_db(executiveentbiz_com_-_guestlist);
$Query="INSERT INTO glist (name, email) VALUES('name', 'email')";
mysql_query($Query, $ Connect);
?>
Flash And MySQL
I need to get Flash to read from mySQL. I know from looking at several web site and tutorials, that generally PHP is used as an intermediary to pass things back and forth from Flash to the database. This is usually done because the information passed needs to be displayed on the Flash page.
What I'm doing is a little different, in that I am getting information from mySQL that will be largely 8-10 bit binary numbers (keyed by date in mySQL). The numbers are actually representing some environmental information collected on a remote site using various sensors and passed to the database from LabView through Kermit to mySQL. I need to get these values into Flash, but not for use as text, just as variables, so that I can do something like [RED]if(value == 00010000) {some_function();}[/RED].
My question: Is it possible to use loadVars() or something else to read directly from the database instead of using PHP in the middle? Or can I use to read sequentially from a text file? I'm continuing to research this on my own, but I figured I'd toss up the quesiton in the interest of shortcutting the process.
Thanks in advance.
Flash Mx, Php, Mysql
Hi, does anyone know of any good resources that deal with the interaction between flash mx, php and mysql. What i specifically am looking at doing is just creating a simple membership signup that allows a user to enter details into a text area in a flash movie and post these to a php file that will input them into a database.
Thanks.
PHP, MySQL And FLASH
Hey everyone,
I have been using PHP with mySQL in the development of sites for a few years now but, want to incorporate it into my flash sites. Problem is I have not been able to find any good books (manuals) that specialize in this area. Yeah, there is a little bit about it in lots of books but, I am looking for something more directly addressing this area.
Anyone have any suggestions?
MySQL - Flash MX
Hello!
Can anyone briefly explain to me the dynamics on how to have a Flash-site interact with data stored in a Mysql database?
Response much appreciated.
MAB71
Flash, PHP, And MySQL
I've been programming in PHP/MySQL for awhile now, and want to start getting data from a MySQL database every few seconds, without a refresh, but have a few questions:
First of all, HOW do I do this? Can flash call up php files just like a regular user, but instead of sending the data to the user - its sent to the flash, and everything needed is taken out? Is there an actual description of how this works, and some example code out there (Not on flashkit, I've looked through all the tutorials and I don't want my hand held through all of this :P, I'd rather have it explained in full ... I'm picky)
Secondly: How would I keep the data refreshing, and constantly up to date? Add header's to keep the data out of cache?
I'm new to flash, so I have no idea how to do all this; but I'd love to add more flash elements to my site
Information:
Flash MX
PHP: Newest production build
MySQL: Newest production build.
Thanks in advanced to anyone who can help me
MySQL And Flash
i want to use Flash MX 2004 Professional to read, edit, and add data to a MySQL database. What is the easiest way to do this. Also, its a linux server so no .asp Thanks
Mysql, Sql, Php, And Flash
OK i know that this night be a lil hard for me to ask.. so i will just say it as easy as i can... ok i got this tutorial from this site (not flashkit) and yes i have tried to get this question answered there but no response... anyway i got this tutorial from this site and i went through it nice and slow.. it is a user authintication flash /mysql/php well i got a windows advanced server 2000 with php up and running and mysql up and running.. i have this just to test flash stuff... anyway so i get ready to use it on a site.. i went to my web hosting company and i asked for my (mysql data base user name and password) well the admin asked me "what are you trying to do sir" you know how they get.. anyway i told him that i needed the info to put in a php file... so he tells me "just send me a backup copy of the data base and i will install it on the server" .. i was like huh... well as you can tell i know very little about mysql but some how i got it workin on my server without a back up copy so i told him i would just send him the .sql file with the tables on it...
this is what i sent;
CREATE TABLE tutorial_user_auth (
userID int(20) unsigned NOT NULL auto_increment,
userName varchar(15) NOT NULL default '0',
userPassword varchar(32) NOT NULL default '0',
userMail varchar(255) NOT NULL default '',
userQuestion varchar(255) NOT NULL default '',
userAnswer varchar(255) NOT NULL default '',
PRIMARY KEY (userID),
UNIQUE KEY userMail(userMail),
UNIQUE KEY userName(userName)
) TYPE=MyISAM;
well when i sent it to him he told me "this is for mysql running on a unix system we have a windows server running sql and the sytax is different" .. again i was like huh.. at this point i was thinking that i knew less about mysql then i do... so i asked him how could i make it so that the windows sql could handle the data base and he told me he did not know... well here i am now... confused and frustrated... i am attaching the files i got from the tutorial... some one please tell me how i can get him the back up for this data base in windows sql format... please i am on my knees begging for help with this one.... if you need more info to help you help me just let me know.. this is the site that i am trying to get this work on the site
i love yall
yo main man lenny
Flash Mx +php + Mysql?
Hello and thanks in advance...
i have been attempting to modify the following script:
Flash MX and PHP with MYSQL
besides content and query differences, instead of using buttons (tabs) i want the information to send and retrieve when a frame is entered. I don't know the correct syntax, but here is what i got so far:
actionscript in frame 3 of movieclip:
PHP Code:
// Stop the frame
stop ();
// Make sure no other panel was chosen
this.onEnterFrame = function () {
if (_global.showPanel != 1) {
gotoAndPlay (1);
}
};
// Set up new loadVars object
a = new LoadVars();
// Find out if user selected a Governate and send data to PHP
if (_global.gov == null) {
a.thisGov = "none";
a.sendAndLoad("areafind.php?thisGov="+a.thisGov, a);
_global.chosenGov = "You did not choose a specific <b>Governate</b>, if you wish to do so, please click on <b>Governate</b> above. Or you may choose an <b>area</b> below:";
} else {
a.thisGov = _global.gov;
a.sendAndLoad("areafind.php?thisGov="+a.thisGov, a);
_global.chosenGov = "You have chosen <b>" + a.thisGov + "</b>. Please choose the area:";
}
// Lay out returned data into textbox
function showAreas() {
var i;
content.htmlText = "";
for (i=0; i < this.n; i++) {
content.htmlText += "<b>" + this["area:"+i] + "</b><br>";
}
}
// Wait for returned data then run function
a.onLoad = showAreas;
and the PHP code:
PHP Code:
<?php
//Connection information
$dbhost = "localhost";
$dbuser = "********";
$dbpass = "********";
$dbname = "bahrainlocator";
// Connect to MySql
$connect = mysql_connect($dbhost, $dbuser, $dbpass)
or die("Unable to connect to MySql");
// Connect to Database
$db = mysql_select_db($dbname, $connect)
or die("Unable to connect to Database");
//query to run
if ($thisGov != 'none') {
$sql = "SELECT * FROM areas WHERE governates = '$thisGov'";
$result = mysql_query($sql)
or die("Unable to get list of areas");
}
else {
$sql = "SELECT * FROM areas";
$result = mysql_query($sql)
or die("Unable to get list of areas");
}
/*//count number of rows affected
$num_rows = mysql_num_rows($result);
for ($i = 0; $i <= $num_rows; $i++) {
$row = mysql_fetch_array($result);
echo $row['areas']."<br>";
}*/
//number of rows to display
$nrows = mysql_num_rows($result);
$rString = "&n=".$nrows."&";
for ($i=0; $i < $nrows; $i++) {
$row = mysql_fetch_array($result);
$rString .= $row['areas'];
}
echo $rString."&";
?>
to test that php was running the variable, i would use
PHP Code:
a.send("areafind.php?thisGov="+a.thisGov, a, "_blank");
and a new window would show up with the correct data.
im at a dead end. any suggestions?
PS. if anyone is wanting to get ahead of me.. they can suggest a way to place the returned data into a drop-down or select box!
Flash MX And PHP & MySQL
I want to make a flash movie and a php script whitch when loaded in the browser it loads a flash movie with the spesific users pictures in a slide show from a mySQL database, like this:
url: http://domain.com/flash/flash.php -> mysql db -> http://domain.com/flash/flash.php -> flash movie.
so a user can make an account and paste links to his pictures, whitch then get showen in a flash movie. The user can then put that flash movie on his site with his own pictures in, but the flash movie is loaded from my server.
Please help!
A Little Flash/MySQL Help...
OK, I having trouble getting Flash MX to send text from an input field to a PHP.
In the Flash I have two input fields. One has the var name "price" and the other has var name "state".
I have a button with the following actions assigned to it...
on (release) {
loadVariablesNum("101.php", 0, "POST");
}
Then I have the following PHP...
<?php
include ('Include.inc');
$conn = mysql_connect($DBhost,$DBuser,$DBpass);
@mysql_select_db("$DBName");
$price = $_POST['price'];
$state = $_POST['state'];
$sql = "UPDATE $table SET price = '$price', state = '$state' WHERE unit = '103'";
if (mysql_query($sql, $conn)) {
echo "record added";
} else {
echo "wrong";
}
?>
It doesn't seem to be passing the info from Flash to the PHP. Any ideas would be greatly welcomed.
Thanks!
MySQL And Flash?
Hi I´m Genesis I work on a PHP based Multiplayer Game but I missing the action and thats why I want to make Shops and Fights with Flash but I dont know how to send and get Variables from a MySQL Database. Can Flash send and get Var. from a MySQL database?
Can Someone Help
Flash & Mysql
Hi, first of all excuse my bad english.
I want to know if it's easy to access a mysql database with flash, and pass variables between flash and php pages, I can't found any tutorial or manual.
Thanks.
Flash, PHP, MySQL
Has anyone ever had problems with a Flash app that loads vars from a PHP page that connects to a MySQL DB?
I made a "Now Playing" app for our station... basically, it accesses the PHP script that pulls the current song (title, artist, and seconds left) from the DB... spits it back to Flash. Flash then displays the info... waits for "seconds left" then goes back to frame 1 which hits the PHP page and starts all over again.
It works great... except when I made it live... within a few hours, there were so many connections to the DB it was using 99% of the CPU and basically made the site unviewable.
Figuring that I'd work on the timing issue later... I went back into Flash and killed the "loop" so that it just accessed the PHP script once per page request.
Problem is the exact same thing happened... 99% of CPU used.
PHP/MySQL is widely used on the site and I've never had this problem before. The server isn't a weak box either.
Has anyone else had this problem? I'm I missing something that's I sould have done? Or does Flash just not play well with PHP/MySQL?
I could do the same thing with flat files I guess... but I'd rather not start over from scratch.
Thanks.
Flash Php And Mysql
Hi all,
i already have a website which uses html, php and mysql and i'm trying to update it by making another version in flash. it's all going well so far but i'm now trying to do my links page.
i have my links stored in a mysql db with the linkname, linurl and linktype as the field for each row of the db. the php code i have for this at the minute is good for using with html but i'm reasonably new to flash and i'm having trouble getting my head round applying some of the php i already have (modified of course) to my flash site.
i can get the info from the db ok using loadVariablesNum and a php script requesting the info from the db as an array. what i am having problems with is how i should be bringing that info into flash. I've checked out a few tutorials and downloaded the files which come with them but am still a bit lost.
i am trying to apply a little bit of flash animation to each link so that it changes when the cursor moves over it. i have done this already with some internal flash links and it looks good. i would like each link from my db to be inserted into a new movie inside my links page. this would mean that i only have to create one version of the movie and it gets loaded once for each link in the db with the info for the link (linkname, linkurl) being inserted into a text field in that movie. As with my other internal flash movie links i would need a button mask for each link. i can't seem to figure out how to load a new version of the movie for each link, insert the relevant info for each link, creat and insert a button mask for each link and make sure that the links for the rollover, rollout, press and release works correctly in the button mask so that the relevant movie for each link is affected properly and when the link is clicked (press) it goes to the right website.
this may be easy for some of you to figure out, i'm not sure. i'm also not sure how well i'm explaining this, but any help people can give me would be greatly appreciated.
If anyone already uses php and mysql in a website to display links from a db, letting me have a look at their .fla files and php scripts would be even better help as i am quite good at figuring out code when i have it in front of me and would be able to apply it to my own circumstances as i need.
Cheers
John
MySQL In Flash
I need to select a variable from a MySQL DB. Everything is set. Can you provide an example of actionscript, for example, to make a textbox say something I could pull out of MySQL? I am familiar with MySQL context itself, I just need help doing it in Flash. ;_;
Thanks <3
Help Me.. Need A Little Help (Mysql, PHP And Flash)
Hey everyone. I Just followed an excellent tutorial on how to use the loadvars with php and Mysql. (check the tutorial at: http://webmonkey.wired.com/webmonkey...w=programming).
I have a php-file, that I searches through my Mysql-DB, and everything works fine. Flash shows a list of all the inserts (in the archives_txt) and when you click an entry, the main text will be shown in anoher textfield (entries_txt).
Everything works, except this: He hadn't thought of, that we ORDER BY DESC in php, so the latest entries will be at the first spot in my onload handler....
I have tried to rewrite the code a bit, and now it's working, except when I click the first link (the latest entry) - then it won't show. I now that this i because of flash starts is for loop at 0 and PHP starts the while loop at 1, but take a look at the code.. this shouldn't be a problem here???
Thanks anyway I'm drowning
Code attached
Flash, PHP & MySQL?
Hi All,
I have a project where I need to display dynamic text data that is stored in a mySQL database, in Flash.
In other words, I set up a web form in PHP to insert/update information into the database, and I need to pull this info out and display it in my SWF. So when a person uses my web form to update the text in the database, the text displayed in the SWF will change dynamically.
Any ideas?
PHP/MYSQL Flash
Hi,
I'm interested in using MYSQL/PHP with Flash.
I've scoured the web in search of info on how to go about this but most tutorials on the subject i've found so far assume your using a remote server and just inform you to setup tables using your PHPmyadmin etc.
As i'm wanting to just test things locally on my own machine, I was hoping someone could provide some insight on how I setup PHPmyadmin to control MYSQL.
I'm running OS/X with apache and have MYSQL server up and running according to my system pane but am not sure how to actually access it or how to setup phpmyadmin or cocoaMYSQL to do this so I can begin creating a database.
I'm not sure whether this is really the correct forum for this question but if anyone has any advice or knows where I can find some info on how to go about this I'd be really grateful.
Thanks
Mysql -> Flash
I have a table in mysql (date, header, body, and image, which is the name of an image file on the server).
I need flash to fetch this data and put it in the movieclip. But how..?!
Anyone good at this?
Flash And MySQL.
How do I connect a flash file to a MySQL database? as in send a query to it. My MySQL database is located on my computer.
Flash 8 / PHP / MySQL Help Please
Hi I'm trying to make a news viewing function in Flash 8. The swf calls out a php script, php script queries the MySQL DB then php sends info to swf file to display it. Unfortunately, the articles don't display and I keep getting "undefined" errors. I don't have this problem when I tested it on my PC but after upoading it to my host the problem arose.
this is the script i used in flash 8 to call out the PHP script:
function getData(ref) {
sectionContent = new LoadVars();
sectionContent.ignoreWhite = true;
sectionContent.onLoad = function(success) {
wait._visible = false;
if (success) {
pressHead.text = this.headline;
var newsPic = this.picture;
var picEmbed = '<img src='+'"'+'images/press/'+this.picture+'"'+' align="left">';
contentText.html = true;
contentText.htmlText = picEmbed+this.article;
calcSize();
gotoAndPlay(56);
}
};
sectionContent.load("jpg/media.php?row="+ref);
}
this is the script i used in php:
<?
$connect = mysql_connect("localhost", "admin", "password");
mysql_select_db("mydb", $connect);
$sql="SELECT * FROM tbl_press_release";
$result=mysql_query($sql);
$row=mysql_fetch_assoc($result);
if(isset($_GET[$row])){
mysql_query("SELECT * FROM tbl_press_release Where press_release=".$_GET[$row]."");
}
?>
<? echo "&headline=" . $row["headline"] . " &article=".$row['article']." &picture=" . $row['image'] . ?>
<?
} mysql_free_result($result);
mysql_close($connect);
?>
I hope someone can help me. Thanks!
MySQL->PHP->FLASH
I want to load 7 pictures out my database and display on a page and by pressing on the picture I wanted to display this picture and information from database to this picture such as ID, Telefon, color, weight...
For connection to database I should write somethig like this:
_________________________________________
<?
$username = "myusername";
$password = "mypassword";
//definition of 3 parameters,which we are going to use by connection
$host = "localhost";
//The name of the database that is to be selected
$database = "mydatabase";
$password = "password";
//Opening a connection to a MySQL Server with following username and password
$link = mysql_connect($host,$username,$password) or die("Error connecting to Database!" . mysql_error());
//selecting the database-bool
mysql_select_db($database) or die("Cannot select database!" . mysql_error());
$ID = $_GET["ID"];
$image = $_GET["image"];
$color = $_GET["color"];
//Close MySQL connection
mysql_close($link);
?>
___________________________
I am newbi in Actionscript and I don't know how to start so I would appreciate any help.
Should I do several holder_mc for every of 7 pictures and dynamic box for ID,Color...(how can i specify to which box to load?)
PHP / Mysql And Flash
Hi, trying to make a gallery of shows, with information and an poster (image). Need to store in mysql and display in flash. Would like one new movieClip instance for each entry. Have the two following scripts but need help to combine them or find another way. Help is extremely appriciated as I have been struggling for awhile.
My get info script (sort of works but doesn´t display the image) :
stop();
//starting variables
displayText = "";
a = 0;
textfield.text = "news:" + Totalnumber_of_entries ;
headerArray = new Array();
bodyArray = new Array();
published_dateArray = new Array();
imageArray = new Array();
image_descriptionArray = new Array();
urlArray = new Array();
url_descriptionArray = new Array();
while ( a < Totalnumber_of_entries ){
headerArray.push(eval( "header" + a ));
bodyArray.push( eval( "body" + a ));
published_dateArray.push( eval( "published_date" + a ));
imageArray.push( eval( "image" + a ));
image-descriptionArray.push( eval( "image_description" + a ));
urlArray.push( eval( "url" + a ));
url_descriptionArray.push( eval( "url_description" + a ));
//trace (visitorArray[a]);
a = a + 1;
}
/////////////////
//starting variables for the next while loop
//amount_to_show changes the amount of comments that are displayed. Change to whatever you want.
amount_to_show = 10;
b = 0;
c = amount_to_show;
/// function to refresh the comments in the textfield2
function refreshComments (){
while ( b < c ){
displayText = displayText + published_dateArray[b] + "<br><br>" + "<b>" + headerArray[b] + "</b><br><br>" + bodyArray[b] + "<br><br>"+ imageArray[b] + "<br><br>"+ image_descriptionArray[b] + "<br><br>"+ urlArray[b] + "<br><br>"+ url_descriptionArray[b] + "<br><br><br>";
b = b + 1;
if (b == Totalnumber_of_entries ){
b = c;
break
}
}
encoder(utf-8);
textfield2.htmlText = displayText;
}
refreshComments ();
Here is the attach new movieclip code:
//Array with all our information
memberInfo = [["Kirupa", "Flashing (MX) complete strangers in 32-bit color.", "http://www.kirupa.com/forum/member.php?u=1"], ["B.Rich", "Basketball, Golf, Web Media.", "http://www.kirupa.com/forum/member.php?u=4513"], ["Senocular", "Fun stuff, like Flash", "http://www.kirupa.com/forum/member.php?u=2867"]];
//Starting x & y values
var xPos = 150;
var yPos = 60;
//For loop to attach our container movieclip and pass the array information
for (i=0; i<memberInfo.length; i++) {
//attach the container clip
attachMovie("container", "new"+i, i, {_x:xPos, _y:yPos});
//increase the y postion each time
yPos += this["new"+i]._height+5;
//add the information
this["new"+i].name.text = memberInfo[i][0];
this["new"+i].interest.text = memberInfo[i][1];
this["new"+i].link = memberInfo[i][2];
}
Anyway to combine the function of these two?
Please hlp, B
[F8] Flash With PHP/MySql
Dear everyone,
I'm planning to build a full double layer flash based website.
The top layer being a mask layer which have the mouse cursor being a torch light which will brighten the area of the website wherever the cursor is.
The bottom layer being a normal website which requires PHP/MySql functionality.
Any way to integrate both PHP/MySql inside a Flash movie?
Thank you very much!
Andy
[CS3][AS3] Flash To PHP To MySQL
I am very, very new to using flash AS3 and php. I have a php file that sends data to a mySQL database. I want a form in flash to send the data to the mySQL database. I am guess that I need to send it via the php file somehow. I have searched allover, but I can not find any help that I can understand. Below is my php file:
<?
$username="USERNAME";
$password="PASSWORD";
$database="DATABASE";
$first=$_POST['first'];
$last=$_POST['last'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];
$fax=$_POST['fax'];
$email=$_POST['email'];
$web=$_POST['web'];
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO contacts VALUES ('','$first','$last','$phone','$mobile','$fax','$e mail','$web')";
mysql_query($query);
mysql_close();
?>
(I know that I need the real username, password, database, and localhost)
Thank you in advance for your help.
Flash PHP XML And MySQL
Hi I need a little advice, I am trying to create a food recipe visualisation tool that will basically store recipes in XML and have some kind of advanced schema whereby Flash will pick up on certain aspects of the schema and carry out a specific animation. I tried to be extra fancy with my design and wanted to somehow incorporate PHP and MySQL into the system so details of Users would be stored in a database and PHP will interface between the users accounts, their details and the system. I just wanted to ask if its possible for PHP to interface with XML aswell as Flash, so if I had a Flash system with an interface in PHP that took details of a recipe, could these be stored as an XML file for Flash to then use later on? I think my idea and design is a little flawed so any help would be appreciated. Thanks
[CS3] Flash To MySql/php To Div
This is kind of a newbie questions. I am trying to load data into a DIV from a Mysql/PHP database after a response from a flash button.
I think I would use ExternalInterface? GetURL?
Does anyone know how to accomplish this. What is the correct funstion/format I should be using. Thanks
Flash MySQL
I have uploaded a file using Flash. I then call upload.php which only has this code:
Code:
if ($_FILES['Filedata']['name']) {
$uploadDir = "home/mydir";
$uploadFile = $uploadDir . basename($_FILES['Filedata']['name']);
move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadFile);
If I try to include code inside the if statement to update my MySQL database so that the location of the upload is recorded then either the database won't be updated, or the upload won't take place (and the database still isn't updated).
Anyone know a way of updating my database directly through Flash, or have any other suggestions?
Flash And Mysql
i was wondering how people can/are able to send information and retrieve information from an sql or mysql server into a flash document
Mysql -> Flash
I have a table in mysql (date, header, body, and image, which is the name of an image file on the server).
I need flash to fetch this data and put it in the movieclip. But how..?!
Anyone good at this?
Flash And Mysql
Hello, I have made a flash file that someone customises using a form and then the information for their customation is stored in a mysql database like so
Name Color Text Website
Pez C Redy Smile www.website.com
The php then creates a copyable box that talks to the flash like this http://www.example.com/flashbox.swf?id=12.
How can I get the flash to take the information from the database and put it into the flash?
I can write php (just) and I presume I have to do something with it.
How do I get this to work?
Anyone that helps (significantly) gets a link on my thanks page
|