PDA

View Full Version : Tut: PHP and Flash roled into one



Luckyrare
10-12-2006, 04:15 PM
I am a bit of a noob when it comes to Flash but have worked out a very simple way of showing information used in php onto flash. This is simple and is not made to be used as I am showing you so it can be developed.

OK we start off with the flash...

Open up Macromedia Flash and create a Dynamic Text box with the var "load"

http://www.uploadz.co.uk/1399071.png

Right click on the first frame, click actions and then type this into the box


this.loadVariables("load.php");http://www.uploadz.co.uk/1490222.png

Save the fla and export the swf...

Now open up notepad



<?php
$user = $_COOKIE[user];

print("load=Hello $user");
?>
Save as load.php

If you change load on the php, you will need to edit the var on the flash

Upload to the your server and it should be working...

Once you have done the PHP file you can put almost anything into the flash... Why not load the text from mysql?

Demo: http://www.uploadz.co.uk/testing/flash.swf

Thanks
Danny

DONT QUOTE THIS POST

omgDAN!
10-12-2006, 04:18 PM
WOW
That's hot.
Thanks +rep if I can.

Luckyrare
10-12-2006, 05:03 PM
WOW
That's hot.
Thanks +rep if I can.

Thanks, I would rep back if I could.

:Blobbed
10-12-2006, 06:22 PM
So if I was to do something more different, I would use:

<?php
print("load=Wassup Sucka?");
?>

Or can I get rid of load?

And, meh n00b: How do you create a dynamic text box? I dont understand var load?

Luckyrare
10-12-2006, 06:28 PM
So if I was to do something more different, I would use:

<?php
print("load=Wassup Sucka?");
?>

Or can I get rid of load?

And, meh n00b: How do you create a dynamic text box? I dont understand var load?


No you have to keep "load"

You make a text box on the the bar you change it to Dynamic text (see image 1)

SimplyTech
10-12-2006, 08:59 PM
seen it a fair amount of times but some may not know +rep

Luckyrare
11-12-2006, 03:17 PM
Thanks for rep ;)

Want to hide these adverts? Register an account for free!