Kuntent has asked for the wisdom of the Perl Monks concerning the following question:

Dear Friends, I've got a little problem showing the records in a .txt file through Flash. This is my script which works correctly in html, but doesn't with flash. Any help?
use strict; print "Content-type: text/html\n\n"; open (LOG, "missatges.txt") || die "$!"; while (<LOG>) { chomp; my @attributes = split/\|/; print "<B>$attributes[0] . '||' . $attributes[1]</B>\n"; print "<BR>\n"; print "$attributes[2]\n"; print "<BR><BR>\n"; } CLOSE LOG;
Thank you very much!

Replies are listed 'Best First'.
Re: Perl and Flash 5.0
by Ovid (Cardinal) on Jul 21, 2002 at 16:30 UTC

    I have this feeling that I must be misunderstanding your question because Flash is not HTML, yet you're asking why your HTML printing routine doesn't work with Flash. Could you be a bit more specifics? Are you trying to call that from a Flash program?

    If you want to dynamically manipulate Flash, check out Perl::Flash. At my company, we've successfully used this to change the text some Flash files display.

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: Perl and Flash 5.0
by BrowserUk (Patriarch) on Jul 21, 2002 at 15:29 UTC

    Frankly, I amazed that your script works with HTML. It is only through luck. Generally, an html page has (at least ) the following:

    <html> <body> .... </body> </html>

    You might also get a better response if you at least tried to explain how you think this might "work with flash"? And what errors you are seeing and where? What indications that this is NOT "working with Flash".

    And I have to say that your "example code" doesn't look particularly useful either? Did you cut and paste this?

    What language is CLOSE LOG;?

    Now I've said this, I doubt that the post will survive long enough for you to read it as I can't actually see a Perl related question. Ho hum.

Re: Perl and Flash 5.0
by Chady (Priest) on Jul 21, 2002 at 17:53 UTC

    If I understand your question correctly, you're trying to loadVariables from a text file which is the return of the perl script.. right?

    If this is the case, first make sure you're printing your variables with & in front of them, and beware that the script might be cached, so call it with a random number if the data sensitively changes..

    So I think the problem is in your flash, not the perl scrpit.


    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

    Chady | http://chady.net/