Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / July 2005



Tip: Looking for answers? Try searching our database.

flash + php   notice board

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lwq - 30 Jul 2005 10:05 GMT
I want to make a small notice board using flash and php where i can display a
certain number of news on my website.. i have not much of problem with the php
+sql end but i not very good at the flash end... can anyone help?
LuigiL - 30 Jul 2005 10:44 GMT
There are a number of ways to do this. On kirupa.com you will find tutorials on the subject. Maybe http://www.kirupa.com/developer/actionscript/flashphpxml_integration.htm one is for you.
lwq - 30 Jul 2005 13:31 GMT
I don't understand the tutorial... especially the part about flah code.... how could i change the flash code(i mean actionscript) given to suit the php script i am getting the information from?
LuigiL - 30 Jul 2005 15:18 GMT
Here is a generic example which you can tweak to your needs.

// results returned from PHP
n=2&item0="<a href='url'>First News</a>"&item1="<a href='url'>Second News</a>"

// ActionScript
//myText is a dynamic textfield on the stage
myText.html=true;

var myNews:LoadVars=new LoadVars();
myNews.onLoad=function(success:Boolean){
    if(success){
        //clear previous news
        myText.htmlText="";
        for(var i=0; i<this.n; i++){ // here we use n (this.n) coming from PHP to
limit the loop
            myText.htmlText+=this["item"+i] + newline; // all news items on new lines
        }
    } else {
        myText.text="Unable to load the news."
    }
};
myNews.load("urltoyourphpfile");
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.