Jump to content

Loading PHP in Flash Dynamically?


renegade44

Recommended Posts

I have a flash site, well im working on one, and I am trying to find out if I can load a news system in a flash document. I have the news.php and all the corresponding documents loaded on the server. Is there actionscript to load the news.php in my flash?

 

if its possible, how can I add css to it of thats at all possible?

 

I appriciate any help, and by all means if you know of a tutorial or something that would help me That would be just as good. thanks!

Link to comment
Share on other sites

-okay, you can't like.. merge php and flash.. you can make flash with php, but you can't make php with flash.

 

what you can do.. is set up the news handling functions in your flash, and let news.php just retrieve parsable information in flash... for example

 

news_1_title:"How to kiss your girlfriend without getting sprung!"

news_1_data:"To be honest, get an ugly girlfriend"

 

then handle the data in flash and put it wherever it goes.. sorry for a bad explanation.. but I havn't coded actionscript in quite a while lol

Link to comment
Share on other sites

well thats the thing in programming, wherever you want it to show up, thats where you'd make it show up, however.. getting the data shouldn't be too hard.. lemme do a quick lookup..

 

*looks up* doo dooo dooo... lol

 

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000316.html

Link to comment
Share on other sites

ok, im a bit lost now. the link you attached doesnt have anything for PHP. its all.txt and a date and time stamp.

 

essentially Im just trying to get the contents of a php document to show up in my flash document, I tried to do the Get method and nothing shows up. do I have to use a dynamic content box in the flash document to get it to work?

Link to comment
Share on other sites

ok bro, well, you don't seem to be understanding me..

 

so I'll try to explain it 1 more time, not being mean or anything...

 

the URLLoader I linked you to in as3, is like php's file_get_contents function.. which gets the contents of the file..

 

now..

 

like you'd parse weather.com to get the weather to show up on your website.. you'd parse your own site.. or make a php file.. which outputs ALREADY PARSED information.. that way when you use the data you parse form this file in flaqsh.. its that much easier..

 

in flash you need to create text fields for text..

 

 

and then you put the parsed data inside the text areas..

 

you can't just do sumfin like

 

include("your file");

 

theres no such thing in flash (I don't think) YOu need to parse your data in flash, from 1 of your php files.. then display the data

 

sorry if you don't understand what I'm saying.. I hope someone else will read this and explain it better to you

Link to comment
Share on other sites

You could make a file called

 

xmlnews.php

 

and echo like

<content>

  <newsItem>

    <date>10/25/08</date>

    <subject>Titanic2 goes down! Rose JR. is a prostitute!</subject>

    <text>Yeah, when the titanic went down it felt sooooo goood, then a voice came out of no where "Give me $50 dollars...."</text>

  </newsItem>

</content>

 

flash has xml handlers

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.