admin(Mark) wrote: For a long time flash has been the program with great potential but limited but the amount of experienced users. What sets flash apart from the rest is that it requires not just good programmers but also good graphics designers which is very rare. Not many people are good at both. How do you stock up? Could you create a latest forum post swf file like the one on this site?. Posted: Fri Jul 08, 2005 1:28 pm
OwossoBorn wrote: This is how I found your site. I was searching for discussions on flash/php/MySql and specifically linking it all together via PHPNuke. First, I want to acknowledge the fabulous site you have here! Bravo on the look/feel/functionality. I recently installed the FlashChat from tufat.com and was very impressed with the integration with PHPNuke. That led me to thinking, why couldn't I create a swf that sits in the header of my site (phpnuke in frames) and periodically queries the tables for realtime info such as new PM's, other members logging on/off, chat invites, public messages, replies to posts, where other members are (forum/chat/blog/wiki) etc... I'm trying to create a more live community meeting place where we can brainstorm and share ideas. Most of those indicators require a screen refresh before a visitor can see them. After I get that functioning, I'd love to add audio/video to the chat swf! I saw your nuke tutorial on doing the custom dynamic sig and wonder if that's all I'd have to do? Create a php file (w/mainfile.php included) and then query the tables that hold all of the realtime info I need and output them as variables that flash can then retrieve via loadvars()? Would need the user's ID... from their cookie or sessions table? I'm guessing that querying the tables about every 10~15 seconds should work. My site is a members only community with only 11 members, so the amount of queries isn't really an issue. I could probably figure out a way to query every 5 seconds but only as long as there has been keyboard/mouse activity for the last 5 minutes. No activity, no more queries. A sort of screen saver approach to cut down on bandwidth. Posted: Tue Jan 17, 2006 9:24 am
admin(Mark) wrote: hi, thanks for your comments on the site Yeah, that's all you need is to require the mainfile.php and use the globals for database connect... $prefix, $dbi. User's id are contained in cookies which can easily be recovered. If you search the userinfo block you should see how they achieve that. I use flash/php/mysql for the latest forums block as you can see in the header. A screen refresh would be great but I think a good way to achieve that is using ajax. The problem might come when flash reads the php. You will have too add some action script to make the flash file refresh itself without refreshing the page. In that case you may not need ajax or screen refresh if there was a good way to make the flash swf refresh itself. Good idea though. Posted: Tue Jan 17, 2006 5:48 pm
OwossoBorn wrote: Thanks for the info. I'll look through the userinfo function and see what I can come up with. Whatever I ended up using, I just wanted to make sure it didn't open up any can of worms. I didn't want to bypass any built in security. If I can cobble up a php file that retrieves everything I want in a neat little UTF8 encoded variable package, then I can use Flash's setInterval() http://livedocs.macromedia.com/flash/mx2004/main_7_2/00001662.html#wp4023423 (edit: apparently Safari won't open livedoc entries individually, use firefox or IE) to call the php page every 'n' seconds. If someone doesn't touch the keys/mouse for 5 minues, that would trigger a clearInterval() to temporarily stop the 5 second queries. As soon as they touch keyboard or mouse, the 5 second queries could be triggered to start again. No swf refresh needed. If any of the variables change on the 5 second queries, then that would trigger a function to show some different graphic for the alert. Posted: Tue Jan 17, 2006 9:42 pm
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||