A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Database info to Flash movie

  1. #1

    Wink

    I need to design a system that will query a database and submit the extracted info to a flash movie. Is there an elegant way to have a Perl cgi script (using the Perl DBI and MySQL DBD) select some specific info and then insert that data directly into a Flash movie running in a browser (embedded in a web page)?

    Thanks,

    MarkW

  2. #2
    Junior Member
    Join Date
    Jun 2000
    Posts
    2

    URLencoded Database Info

    Hiya..

    What you need to do is..
    1: Use 'Load/Unload Movie-->Load Variables' to get the info from the web server. This has to be URLencoded information. What that means is that is needs to be name=value pairs seperated by &s.
    2: The Perl script should query the DB, get a record set, and then send the info back to the Flash movie. The easiest way of doing this is, once you have your connection open (eg adodb.connection) writing the whole lot of name=value pairs to a string buffer and sending them off..
    Something like..

    $string = "buffer=true";
    for ($x=1;$x>10;$x++) {
    $buffer = join('', $buffer, '&', $field[$x], '=', $value[$x]);
    }
    print "Content Type=application/urlencoded\n\n";
    print $buffer;

    Obviously this assumes that you have your info in two arrays called @array and @value.

    Anyway, its something to be going on with..

    Chris

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