Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 9th, 2003, 09:32 PM
dinno2 dinno2 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 18 dinno2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Flash, PHP, MYSQL - Help

Ok, I have been searching for days with no luck.
What Im trying to do in flash mx is to connect to mysql database using php and display the results in the flash swf movie.
I have found numourous tutorials on this subject, however i cant get a single one to work.

A little info about what i have so far and the problems im getting:
note: the php file has the swf embeded in it, not a seperate file.

Textbox.swf ----------------

a single textbox with a varible called text. see above screenshot.

textbox.php-----------------
PHP Code:
<?php
// change this to your database details
$connect = @mysql_connect("xxxxxx""xxxxx""xxxxx") or die("cannot connect"); 

// Change the database name
mysql_select_db("smarty2"); 

// change varaible to your database
$sql "SELECT * FROM pirep";
$result mysql_query($sql) or die("Query failed");
$row mysql_fetch_array($result);
$text $row['pilotid'];
mysql_free_result($result);
mysql_close$connect );
?>
<p><!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--<P ALIGN="LEFT"></P>-->
<object id="Untitled-1" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="400" width="550" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
  <param name="_cx" value="14552">
  <param name="_cy" value="10583">
  <param name="FlashVars" value>
  <param name="Movie" value="http://www.psavirtual.com/textbox.swf">
  <param name="Src" value="http://www.psavirtual.com/textbox.swf">
  <param name="WMode" value="Window">
  <param name="Play" value="0">
  <param name="Loop" value="-1">
  <param name="Quality" value="High">
  <param name="SAlign" value>
  <param name="Menu" value="-1">
  <param name="Base" value>
  <param name="AllowScriptAccess" value="always">
  <param name="Scale" value="ShowAll">
  <param name="DeviceFont" value="0">
  <param name="EmbedMovie" value="0">
  <param name="BGColor" value="FFFFFF">
  <param name="SWRemote" value>
  <param name="MovieData" value><embed src="textbox.swf?text=? echo $text ?>" " quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400">
</object>
</p>

the out put i get is shown in the photo below.


Note: one thing i found. If i have the instance name as text, i get the results as seen in the photo above, but when i only have the variable named text and no instance name, i have a blank swf.

I realize i am not the most knowledgeable programmer, i put this together copy and pasting from tutorials, I really would like help with this if anyone can help me with tutorials or can tell me what i am doing wrong, i sure would appreciate the help.

Thank you
Michael

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Flash, PHP, MYSQL - Help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway