dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: PHP+Flash news

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Location
    Sweden
    Posts
    3

    PHP+Flash news

    Hello,
    I believe you have got this question here many times and I have gone through the forum before posting this here.. I got some tips or tutorials but still I am not managing to make that work...

    I have a website where I use php+mysql to show the news
    (headline, date, text and picture fields)..

    I want to re-design the site and make it in Flash, and I would like the flash movie to show the information from the database, just as I have it now with my php script.

    The script is as follows:

    <?php
    include ("config.inc");
    $db = mysql_connect($mysql_host, $mysql_user, $mysql_password);
    mysql_select_db($mysql_database, $db);

    $query = mysql_query("SELECT * FROM news ORDER BY date DESC");
    for ($conta=0;$conta<3;$conta++)
    {
    if ($row= mysql_fetch_array($query))
    {
    $id = $row["id"];
    $headline = $row["headline"];
    $text = $row["text"];
    $picture = $row["picture"];
    $link = $row["link"];
    ?>

    And then I use the

    <? echo $headline;?>
    <? echo $text;?>
    etc

    to show the different variables in a table.

    What I don´t know is how to change this script in order for the flash to show the variables, I have set different dynamic text areas with a variable name etc.. but I don´t know what to change in the php code in order for this to work :/

    I hope somebody can help me!
    And again sorry for asking this again ...

    THX!

    J
    Last edited by Sparvöga; 10-12-2002 at 11:25 AM.

  2. #2
    Junior Member
    Join Date
    Oct 2002
    Location
    Sweden
    Posts
    3

    nobody?

    nobody?

  3. #3
    The Supreme Shaman and Keeper of Polar Lights
    Join Date
    Apr 2000
    Posts
    1,175
    Hi !

    You may try to call that script from flash using loadvariables action and say in the end something like
    <?echo "headline=".$headline."&text=".$text;?>
    after it you will have variables headline and text inside flash movie
    Good luck !
    Ilya. www@polar-lights.com
    Flash sources page

    [swf width="285" height="50" background="#FFDB5A"]http://polar-lights.com/biker/polar.swf[/swf]

  4. #4
    Junior Member
    Join Date
    Oct 2002
    Location
    Sweden
    Posts
    3
    Thx a lot Ilya!
    I must be doing something else wrong, cuz it is still not working

    It works when I load a whatever.txt but not when i load the .php file :/

  5. #5
    The Supreme Shaman and Keeper of Polar Lights
    Join Date
    Apr 2000
    Posts
    1,175
    Hi !

    have you some url to look at your .php and .swf files ?
    And what action do you use to call .php from Flash ?
    Good luck !
    Ilya. www@polar-lights.com
    Flash sources page

    [swf width="285" height="50" background="#FFDB5A"]http://polar-lights.com/biker/polar.swf[/swf]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center