00:00
00:00
Newgrounds Background Image Theme

ESCANOR2169 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

As: Php Flash

10,670 Views | 46 Replies
New Topic Respond to this Topic

Response to As: Php Flash 2006-04-01 05:23:59


At 11/30/05 09:33 AM, Inglor wrote: doesn't this belong in PHP main?

anyhow, nice work, you're wrong about one thing...

PHP - Personal Home Page

php.net says on the title PHP Hypertext Preprocessor so it's a common mistake, check ZEND (the creators of php kinda) if you care and wanna see it's relaly Personal Home Page

google says it's hypertext preprocessor therefore im afraid it is. If google says something it is right. If google said an apple was made of meat I'd beleive it


- Matt, Rustyarcade.com

Response to As: Php Flash 2006-04-01 05:51:22


if google says then it must be true!

Response to As: Php Flash 2006-04-01 05:55:46


shazwoogle, didn't you copy+paste that as from THIS site?

Response to As: Php Flash 2006-04-01 06:41:45


This is a very helpful tutorial, it even helped someone today who wanted to know how to use PHP and Flash.

Well done, very well explained!

Response to As: Php Flash 2006-04-01 08:17:04


I didn't understand a word you just said. Sorry.


:(

BBS Signature

Response to As: Php Flash 2006-04-01 08:21:52


Perhaps it might be because you know neither of PHP and ActionScript?

Response to As: Php Flash 2006-05-20 05:13:43


ok i have a news script on my site and i wnat it to show the most recent post on my flash that im working on for school its under news/latest.php do i need it to write to a .txt document or can it just load straight from the php file ?

Response to As: Php Flash 2006-12-15 22:02:40


So you have to store everything in variables in order for it to work?

Anyways, great tutorial.

Response to As: Php Flash 2008-07-09 05:34:53


At 11/29/05 08:06 PM, shazwoogle wrote: put that in a text file and save it as save.php

It saves it as a .txt file called save.php :/

wtf?

BBS Signature

Response to As: Php Flash 2008-07-09 05:50:23


At 7/9/08 05:34 AM, Hoeloe wrote:
At 11/29/05 08:06 PM, shazwoogle wrote: put that in a text file and save it as save.php
It saves it as a .txt file called save.php :/

wtf?

Oops, I forgot to switch the filetype to all files before saving :P so nevermind.


BBS Signature

Response to As: Php Flash 2008-07-09 06:15:40


Ok, sorry for the triple post, but I got another problem.

My variables are loading alright, but they load as $name and $info");
How can I get them to just load as name and info, without all the crazy symbols?


BBS Signature

Response to As: Php Flash 2008-07-09 06:17:16


Show code


- Matt, Rustyarcade.com

Response to As: Php Flash 2008-07-09 06:19:08


PHP:

<?php $white = "whitespace"; $name = $_POST['name']; $info = $_POST['info']; //-------------------- $fh = fopen("text.txt", "w+"); fwrite($fh, "white=$white&name=$name&info=$info"); fclose($fh); header("location: http://shazwoogle.t35.com/text.txt"); ?>

AS2:

var myData:LoadVars = new LoadVars(); name = ""; info = ""; myData.onLoad = function() { info2 = this.info; name2 = this.name; }; myData.load("data.php");

My PHP file is in the same directory as my .swf under the name "data.php"


BBS Signature

Response to As: Php Flash 2008-07-09 06:21:20


Why aren't you using my suggestion from the other thread?

I don't understand what you're after so my help ends here :P


- Matt, Rustyarcade.com

Response to As: Php Flash 2008-07-09 06:22:55


At 7/9/08 06:21 AM, Rustygames wrote: Why aren't you using my suggestion from the other thread?

I don't understand what you're after so my help ends here :P

I didn't really know where to go from your suggestion...

All I'm trying to do is recieve data from a php file in separate variables. If I can get this to work how it's supposed to, there should be no problem.


BBS Signature

Response to As: Php Flash 2008-07-09 06:29:39


At 7/9/08 06:22 AM, Hoeloe wrote:
At 7/9/08 06:21 AM, Rustygames wrote: Why aren't you using my suggestion from the other thread?

I don't understand what you're after so my help ends here :P
I didn't really know where to go from your suggestion...

All I'm trying to do is recieve data from a php file in separate variables. If I can get this to work how it's supposed to, there should be no problem.

Ok, so I managed to fix it, but only in a temporary way which makes the whole thing pretty pointless :P

<?php $fh = fopen("text.txt", "w+"); fwrite($fh, white=$white&name=name&info=name&); fclose($fh); header("location: http://shazwoogle.t35.com/text.txt"); ?>

The PHP was supposed to read from the variables, but instead it just read the variable names. So I removed the variable defining code, removed the quote marks and added a variable divide. The problem is, the point of this was to avoid listing all of these values in an array, and look at this bit:

fwrite($fh, white=$white&name=name&info=name&);

Familiar?


BBS Signature

Response to As: Php Flash 2008-07-09 07:32:00


Actually, nevermind, it turns out I cant use PHP anyway. I found the answer with lovely little things called Classes. If there isn't a tutorial on it already in AS:Main, I'll make one when I get time.


BBS Signature