Forum Moderators: coopster

Message Too Old, No Replies

Using Flash and PHP

seeking tutorials on flash with php

         

WhosAWhata

1:01 am on Jan 11, 2004 (gmt 0)

10+ Year Member



I'm trying to make my website as interactive as possible (DUH!)
One great tool I've been learning is flash. I know that flash MX 2004 was designed to be used very easily with PHP (my perferred language) so I was hoping you could give me links to all your favorite tutorials about combining these tools.

As always,
many thanks

coopster

2:29 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I must admit, I don't personally develop using FLASH -- however, others in our company do. I'll ask them if they have any favorite tutorials. In the meantime, I found some using Google, the first two look the most promising:
  • h**p://www.phpbuilder.com/columns/hill20011214.php3
  • h**p://www.macromedia.com/devnet/mx/flash/articles/flashmx_php.html
  • h**p://www.sephiroth.it/tutorials.php

ergophobe

8:08 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've been sort of vaguely toying with looking into building a Flash-based GUI for various reasons. Even though I normally consider myself a confirmed Flash-hater, there are some things it does very well.

Anyway, one of the sites Coopster referenced mentioned that Flash MX had mad creating interfaces that interact with MySQL and PHP easier to build. The only version of Flash that I own is Flash 3, which I got when I bought the Macromedia Suite years ago (since the only thing I really use from the suite is Fireworks, I haven't upgraded).

So now I'm wondering, if I do decide to go that way, should I get Flash MX? With respect to PHP/MySQL interaction, is there a lot of benefit to having a recent version of Flash?

[edit]From the Macromedia site, it appears to me that Flash MX Pro is required if you want to use forms and connect to databases and it seems like a lot of this is "new" (forms were added in Flash 4, as far as I can tell, but that still means upgrading before I can really even play around with it enough to see whether or not I'm really interested).

Tom

[edited by: ergophobe at 8:20 pm (utc) on Jan. 12, 2004]

jatar_k

8:11 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I went to a seminar when they launched Flash MX and they talked all about using various scripting languages in concert with Flash. I haven't ever used it, since I personally have no use for Flash at all, but it did seem interesting. I believe it may have been restricted to Flash MX.

lorax

8:26 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Perhaps these [macromedia.com] might be of some use.

<added>url=http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial2.html]Forgot this one[/url]</added>

benihana

9:58 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it appears to me that Flash MX Pro is required if you want to use forms and connect to databases

not sure about mx, but in mx 2004 (not pro) i quite easily created a flash 'translator' for english into geordie slang that sent a requset to php, and in turn to mysql to 'translate' the contents of an input box. im pretty sure it could be scaled up to something more complicated.

twist

7:12 am on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you care about being validated in xhtml or html you might want to check out this thread [webmasterworld.com].

From php to flash is pretty easy if your using flash 6 or 7 (I can't remember if 5 supports flashvars or not).

Here is a example of a simple page counter,

First off, I put my flash script in a function,

function Flash( $width, $height, $title, $color, $fvars ) {
// data goes here //
}

Now do the usual mysql/php database update/retrieval and get the number of hits to the page send that to flash using flashvars.

$fvars = 'counter='. $hits;
$counter = Flash( 100, 30, 'counter', 'FFFFFF', $fvars );

You can send variables to flashvars the same as urls. var1=1&var2=2&var3=3 and so on. So getting the data to flash is pretty easy.

After spending a lot of time creating a flash login. Easy enough to do. The problem is when you post variables. Opera 7 included some new hot keys that screw up posting variables from flash. I ended up writing a php script that if variables posted from the flash login form ended up being empty it would just redirect the user to a html login screen. If you care about Opera users you might want to scan their forums to find out more about it.

I'm not sure if your looking for really advanced flash stuff or just basic interweaving of flash and php? Anyway, would love to help if I can.

Good luck.

WhosAWhata

11:25 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



thanks for those...i personally don't use mySQL or any database for that matter (i know they're useful but my host only allows one)

anyways i learned a lot...thanks

ergophobe

12:43 am on Jan 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




I'm not sure if your looking for really advanced flash stuff or just basic interweaving of flash and php? Anyway, would love to help if I can.

Really basic by Flash standards. I was thinking of using it to make an interface that more closely mimiced a desktop interface. So when consulting a database, users would not have to get a whole new page each time, but just the new data.

I think you can do that with Flash/PHP/MySQL without getting too fancy (i.e. no animation or anything like that).

Tom

max0matic

7:53 am on Jan 16, 2004 (gmt 0)

10+ Year Member



Use AMFPHP

amfphp.org
www.macromedia.com/devnet/mx/flash/articles/amfphp.html
www.sephiroth.it/tutorials.php

regards

[edited by: jatar_k at 4:34 pm (utc) on Jan. 16, 2004]
[edit reason] delinked [/edit]

ergophobe

4:37 pm on Jan 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Max0matic

Thanks for the links. I have actually already been there. It seems, though, that my question is so basic that nobody really bothers to address it. I'm trying to figure out what is the minimum version of Flash that I need before I can play with AMFPHP?

Do I need MX?

Put it this way - my Flash epertise extends to be capable of visiting Flash sites and that's about it ;-)

Tom

max0matic

10:43 am on Jan 19, 2004 (gmt 0)

10+ Year Member



Flash MX

[edited by: jatar_k at 4:43 pm (utc) on Jan. 19, 2004]