PictureFlow 3.2 Ajax it!

Beware: advanced JavaScript knowledges required in this article…
Here comes the way to take control over PictureFlow in AJAX mode! In this 3.2 minor release version, I’ve just unlocked the call back functions to drive or reload the flow with a JS Object Array.
PictureFlow, since 3.2 minor release, has capacity to dialog with 5 JS functions in your html:

  1. echo(myText:String) to simply test communication between your JS and PictureFlow: This function add a simple text over the Flow
  2. killStack() to empty your set of images
  3. deplace_D(step:int) to move pictures to the right as much as you tell it in the step parameter.
  4. deplace_G(step:int): Same to go left.
  5. refeed([myNewSet of object]:array, ShownPicture:Int): This very interesting function allows to refeed the stack with a pre-builded array of Flow object instead of reading a new XML. These object just have to have the xml tags as properties to be carried out by PictureFlow.

Example of a flow object:

var flowItem1 = {
	image : 'pictures/notsogood/135/13.jpg',
	action : 'pictures/notsogood/13.jpg',
	title : '13',
	desc : 'flowItem1'

But now, a little test will be more significant. So, TEST IT NOW

Here below, is the source of the test, I use JQuery syntax but you can adapt it to your favorite JS Framework.

PictureFlow | Ajax Demo

A propos de cet article