Flash formating of PHP data?

Say you have a message board.

You pull your data from mySQL via PHP and load it into Flash.

How muh control do you have over it ?

Can you work with it like you in HTML.

Ie…
Alternate colour tables ?
Inserting graphics ?

etc etc

Bump

This is a simple question… Someone must know yes or no ?

You have as much control as you add in the php code

Thanks Fiery_rockstar

As yet I can’t find a single example or tute on it.

Everything I have seen so far in Flash looks like it came from Notepad.

But if you say it can be done I will keep looking.

No probs, I have never seen a tutoriol or anything on it and I’m not a php legend myself so I’m not 100% sure on how to do it, but I’m about 90% def that you just write the script in Dreamweaver the same way that you would an HTML script. Try looking around for some example MySQL guestbooks and having a look at the php scripts.

J

I have search high and low all over the internet on every flash site there is.

I have looked for guestbooks, chats, scoreboards and I can’t find a single example that doesn’t look like notepad.

The current Guest book I am using passes 10 entries at a time.
I am guessing that I would have to have a for loop in PHP to pass each one on its own to flash broken down, ie Name: Message etc.

Then I would have to have a for loop in Flash to duplicate movies for each of the blocks.

Unfortunatly coding that from scratch is way out of my league… So without some code sample I am going to have to give up on what I want, and settle for what I can do. :frowning:

You can only send text into the flash directly from the php, but if you are creative, with that text you can give flash valuable information, for example color codes. Another cool thing that you can do is give flash a url for an image and then have flash load that image. The options are pretty much unlimited. I mean it will definitely take a lot more thinking and planning and coding than making an html guestbook, but it is definitely possible :slight_smile:

Good luck. =)

I’m trying to make a guestbook for my site at the minute also and well, I suck lol, so a guy I know is gonna teach me basically everythign there is to know about php and databases, apparently. It’ll probs not be for a while but if I ever find out how to do it I’ll give you a shout.

This is the best guestbook that I found, it took me about 1 minute to have it up and running and it easy to change around.

http://www.flash-db.com/Tutorials/guestbook/

This is the most advanced one that I found, so advanced I wouldn’t even want to touch it.

http://script.digichina.net/guestbook/guestbook.htm

Basicly I want the first one, but instead of output that looks like notepad, I want it to look more like these forums. I want to have it look like it is in tables and have icons next to peoples names etc…

But I can’t find one single examle…

I have seen the first one, I wanted to use that for my site but when I set it up I kept getting three errors in the script and when I asked about it on their forums the best they could come up with was “ignore them”. Apparently there is a variable and the point at which it happens is undifined, so my server reports it. Never did get that sorted out…

[edit] that second one is pretty cool :):?)

You can only send text into the flash directly from the php,

Thats all I need…

Ie: I had planed to have Sex: Male/Female
Once it was loaded into the movie I was going to have it check the sex, and set the background colour of the post to reflect it. Ie: light blue for Male posts, and light pink for girls.

And other stuff like that… but I need to get it in there before I can…

kept getting three errors in the script and when I asked about it on their forums the best they could come up with was “ignore them”.

Do you remember exactly what the problem was ?

Did it start and have errors ?
Not load the messages ?
Give error on sumbmitting ?

It loaded up the entries but then there were three errors that came up when you submitted each entry. Give me 5 mins I’ll set it up again and show you what I mean.

Here it is. Its fine now, but then you sign it… try for yourself.

No worries…
I have spent my whole weekend looking for an example of anything, even a shopping cart or something with tables… I will be looking for a couple more hours before I go to bed…

Maybe we will get lucky and sort out your errors.

I wish someone could sort them out :expressionless: Did you get anything like that when you installed it?

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 48

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 49

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 50

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 51
Name: The_Vulcan
Email: [email protected]
Comments: Testing
Date: 2004-07-18 16:24:24

Notice: Undefined variable: i in c:\domains\vapour-music.co.uk\wwwroot ests\GuestBook.php on line 54

Wow that is funny…

Have you changed anything in the files would be my first question ?

If you want .Zip and Post your .php file and .swf and I will upload it to my server and see if it works.

If it works it is a error on your server.
If it dont work there is a error in your files.

$DBhost = “localhost”; // Database Server
$DBuser = “"; // Database User
$DBpass = "
”; // Database Pass
$DBName = “***********”;// Database Name
$table = “guestbook”; // Database Table
$numComments = 10; // Number of Comments per page

Just change your info in the .php file before you send it.

Everything is straight out of the zip file, thats what I don’t get. I was told I might need to adjust table widths in MySQL or something but I don’t know squat about MySQL so… shrugs… give me two minutes and I’ll post the zip for you

Nah I didn’t have a problem at all…

The only thing I had to do was look up my database name…

Here is one that I was playing with…
I was experimenting/farting around with password protection so its not functional…

Just select Cathy from the drop down menu and hit submit.
http://www.cathyschultz.com/boylen/Girls%20of%20Boylen.html

Sweet, I was thinking of doing something like that because we kept getting a load of a-holes just spamming our old book. The zip file is attached.