Jump to content

New to Flash with adding PHP


Twister1004

Recommended Posts

Hey everyone! Well my life just got a whole lot more complicated! D=.

 

Ok, I basically have a huge question, which I know nothing about flash and I would like to ask everyone, if you know how to include the PHP stuff on the action script. Is it like normal in HTML where you go <?php ?> and stuff or do you have to include it from another file?

 

If anyone could help me with this, it is greatly appreciated!

 

P.S.

My game design team (new team) is converting to flash, and I don't know anything about it. So this is why I'm asking.

Link to comment
Share on other sites

What corbin means to say is that if you want to "have PHP in your flash" it's not what you think.  You can interface with PHP via AS... but PHP will always be doing PHP things and processing and serving up data/html/ or interacting with a database.

 

If you are the "php guy" of your game design team, you won't do anything different other than set up pages for your "flash guy" to talk to with his AS.  It works the same way as if you were to use a form/url.  The only thing you might do differently is setup return data into things that will be easy for the AS to pickup and interpret (such as xml for scores, or values for ingame things)

Link to comment
Share on other sites

What corbin means to say is that if you want to "have PHP in your flash" it's not what you think.  You can interface with PHP via AS... but PHP will always be doing PHP things and processing and serving up data/html/ or interacting with a database.

 

If you are the "php guy" of your game design team, you won't do anything different other than set up pages for your "flash guy" to talk to with his AS.  It works the same way as if you were to use a form/url.  The only thing you might do differently is setup return data into things that will be easy for the AS to pickup and interpret (such as xml for scores, or values for ingame things)

 

 

Uh, you can't embed PHP in Flash....

 

 

They can communicate in a couple of ways, but no embedding.

 

 

 

Yeah, I hinted at that, but I guess I should've been more clear ;p.

Link to comment
Share on other sites

You can create a PHP login system and access it through Flash (AS) to authenticate.  As for storing the authentication inside flash, I'm not sure how you do it.

 

Stop thinking of PHP and Flash as things that work inside one another.  PHP is a separate entity.  It processes things, interfaces with a database perhaps, and returns content (be it xml, html, plaintext, etc).  As soon as PHP does any of those things, it stops.  Each request is treated as new (except for sessions, kinda)

 

Flash is used for creating movies, timelines, events.  It provides constant feedback and event listening because it's persistent.  ActionScript can be used to query a webpage just in the same way that your browser would.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.