This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > October 2005 > displaying html or php in flash web site





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author displaying html or php in flash web site
jeffhanley

2005-10-18, 10:18 pm

I've been struggling with this for a while now and could use some help. We are
considering going all flash with our online music channel site. The last
"missing" element is to display our now playing info. I'd like to display the
contents of a file called song.php that is generated by a script that resides
on our site and pulls info from a shoutcast server. Can someone suggest a
solution? Tried using dynamic text but I'm not "gettin' it." Thanks!

Motion Maker

2005-10-19, 3:16 am

PHP just needs to echo either varname1=value&varname2=value back and use
LoadVars in Flash or echo XML tags back and use XML object in Flash.

Then you move the received data to whatever, a dynamic TextField or a Flash
UI Component.

Here are a few examples of getting data from PHP into Flash:

Basic Example:
http://www.hosfordusa.com/ClickSyst...oadVarsEx01.php
Basic Example with Flash UI Components
http://www.hosfordusa.com/ClickSyst...oadVarsEx02.php
Listing mysql Database Table Using PHP, XML and DataGrid Component
http://www.hosfordusa.com/ClickSyst...SQLEx01_Doc.php

--
Lon Hosford
http://www.lonhosford.com
May many happy bits flow your way!
"jeffhanley" <webforumsuser@macromedia.com> wrote in message
news:dj41mu$7bf$1@forums.macromedia.com...
I've been struggling with this for a while now and could use some help. We
are
considering going all flash with our online music channel site. The last
"missing" element is to display our now playing info. I'd like to display
the
contents of a file called song.php that is generated by a script that
resides
on our site and pulls info from a shoutcast server. Can someone suggest a
solution? Tried using dynamic text but I'm not "gettin' it." Thanks!


jeffhanley

2005-10-19, 6:31 pm

Lon
Thank you very much. I was able to dissect your example and get a result very
close to what I am looking for. Two more questions (I hope only two).

The output that I'm getting is in a default font style, size and color. Can
you please explain or point me to an example of how the loadVars output can be
formatted? I ended up using your loadVars basic example and tweaking it pretty
heavily by slimming it down to 3 layers of one frame each. That was all I
needed to display the artist and song title.

Also, can the final .swf be made to refresh periodically to reflect the
changing "now playing" info?

Thank you

jeffhanley

2005-10-19, 10:25 pm

Duh. Sorry. I was so busy working the actionscript and synching it with the PHP script, I failed to notice you had already formatted the dynamic text. Got the first question covered. Thanks.
Motion Maker

2005-10-20, 3:16 am

I suppose you are considering a client side pull example and so Flash would
have a timer. You can do these with the playback head playing a frame and
using time measurements.

On the other hand the setInterval method is popular.

These are a two examples that use setInterval that you might be able to
explore to see if they fit your need. The second has a LoadVars in it but is
loading text files which could be PHP files as well.

http://www.hosfordusa.com/ClickSyst...ntervalEx01.php

http://www.hosfordusa.com/ClickSyst...valEx02_Doc.php


--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
"jeffhanley" <webforumsuser@macromedia.com> wrote in message
news:dj6fbg$mv6$1@forums.macromedia.com...
Lon
Thank you very much. I was able to dissect your example and get a result
very
close to what I am looking for. Two more questions (I hope only two).

The output that I'm getting is in a default font style, size and color. Can
you please explain or point me to an example of how the loadVars output can
be
formatted? I ended up using your loadVars basic example and tweaking it
pretty
heavily by slimming it down to 3 layers of one frame each. That was all I
needed to display the artist and song title.

Also, can the final .swf be made to refresh periodically to reflect the
changing "now playing" info?

Thank you


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews