Flash + G2 - FG2Interface
Tim Plummer
Joined: 2006-04-24
Posts: 19 |
Posted: Thu, 2007-01-04 12:03 |
I have developed a simple flash front end interface for gallery2 called FG2Interface. It requires no modification to the gallery2 code, as it talks directly to the mySQL database. You can see an online demo at: For more details, visit my website: regards Tim |
|
Posts: 19
Here is an example of a full flash website that uses Gallery2 as the backend.
http://www.peterspencerphotography.com.au/
The weddings, portraits on location, special occasions and alternative pages all use FG2Interface to allow flash to display the gallery2 content.
I'd be interested to hear what other people think of this website.
Posts: 565
All the motion [sic] effects makes me feel slightly nauseous and
motion may trigger migraines in other people. The rough jiggering
rather looks amateurish and most certainly detracts from the fine
imagery of the photographer's work. Site seems to be in danger of
having 'the tail wagging the dog' with respect to where the main
attention should be live and of what you might remember seeing.
Pictures don't move. Albums don't move. If 'movies' are wanted
get a video camera. I wholeheartedly support stills photography;~)
----best wishes, Robert
Posts: 19
Thanks for your opinions Robert. It's always great to hear other points of view, even if I don't agree with them
I'd love to hear what other people think.
Posts: 565
Tim---- I applaud your efforts even if I don't agree with the content.
Sites with Flash content should provide an opt-out 'stills' button.
Those that would like to use it, or have to use it, will be appreciative.
Those that don't want to use the opt-out button really won't care less.
It shows your site's visitor that the site was thoughtfully designed
and does not somewhat bullishly mandate that all visitors *WILL* get
to experience all the moving-about-stuff whether they like it or not.
Who knows? With such a retreat option you might tempt a few Luddites
or migraine sufferers to tolerate more than just a few seconds of
irritation before hitting the exit button in terminating annoyance.
----best wishes, Robert
Posts: 19
Hi Robert, Thanks for more feedback. I accept that full flash websites and associated animation are not to everyone's taste. Perhaps I will develop future versions with less animation/movement to cater for visitors such as yourself. Regards Tim
Posts: 22
Tim, can you provide some more technical details about how FG2Interface talks directly to the MySQL database? If I purchase FG2Interface, how will you handle updates if the Gallery2 databases change? Does it work with the latest version of Gallery2? Are you using ActionScript 1.0, 2.0, or 3.0? How about a code snippet of how you'd use FG2Interface in Flash?
Posts: 19
Hi JohhnyC,
Thanks for your interest in FG2Interface. FG2Interface uses php code to connect to MySQL database and run various select and join commands to get the album name, filename, url to thumbnail image, image width, image height etc. The flash file then reads these variables from php, which it uses to display the images. You can load FG2Interface into your site within a movieclip.
The flash interface is very basic, but it is a good starting point for a developer and will save you having to reverse engineer how gallery2 works. You can use the code as is, or you could improve it and create your own fancy flash interface like this customer:
http://macrennie.versionproductions.com/fg2interface/index.html
In regards to updates of Gallery2, I think it is unlikely they are going to dramatically change the database structure, the core fields for filename, image height etc will probably not change so FG2Interface should work seamlessly with future versions. FG2Interface was developed using Flash8, with actionscript 2.0
I have not tested FG2Interface with the latest version, but I am confident it will work as the database structure has not changed.
As far as code snippets go
// here is flash calling one of the php files
loadcategories.sendAndLoad("galleryitems.php?id="+this.galleryalbum, loadcategories,"POST")
// here is php output for one variable
&filename0=1060.jpg&
// here is a variable being loaded into flash
item_mc.filename=loadcategories["filename"+i];
// Code to load FG2Interface into your own flash site
FG2Interface = _root.createEmptyMovieClip("photogallery", 10);
FG2Interface.loadMovie("FG2Interface.swf");
Hope this helps.
regards
Tim
Posts: 8339
My mediaRss.php xml generator provides most of the info a flash frontend would need (for viewing anyways). Admin and uploads would still need another view.
XML is the best way to get info from gallery without directly interacting with the db. Assuming you know how to make flash read it.
Further usage instructions can be found here.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 22
This is what I'm looking for. Thanks suprsidr!
Posts: 19
I have now decided to give FG2Interface away for free. You can download via our website http://www.tamlyncreative.com.au/fg2interface/
Hopefully some people will find it useful.