PictureFlow 3 AS2 API how2play

PictureFlow 3 AS2 API Demo

You should have Javascript active and Flash Player 10.0.22 and above to see this page


Get Adobe Flash player

Pour les Flasheurs et ceux qui veulent allez un peu plus loin avec PictureFlow. Voici un petit exemple de lanceur avec les sources en AS2 qui va vous permettre de l’intégrer proprement dans vos projets flash et d’en prendre le contrôle de manière plus fine. Ainsi, vous pouvez jongler avec différents xml ou créer vos propres boutons de navigation, déclencher ou encore arrêter le slide show… What else ?

For the Flash developers and those who wants to go far more with PictureFlow. Here is a little launcher app coming up with all its AS2 source code to better integrate the Flow in your flash projects and provides an accurate way to take the control on it. Indeed, you can now switch between different xml files or create your own navig buttons, start, stop the slide show… What else ?

Télécharger le FLA / Download the FLA

PictureFlow API : Le code AS2 / The AS2 code…

// PictureFlow Loader V2.1
// Author: osamwal
// Release: November 2008

var PFlow:MovieClip; // The PictureFlow Clip

// Ecouteur de chargement du clip // Loading Listener
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadInit = function(mc:MovieClip){
	PFlow = mc;
}

// Charge PictureFlow avec xml variable  // PictureFlow Call with xml path as parameter
function loadPF(myXML:String){
	ResetScene();
	myMCL.loadClip("pictureflow-H135.swf",myPFStage,
	xmlfeed=myXML,
	superGlass = "true",
	myColor = 0xffffff,
	myAlpha = 0,
	myBckgrnd = 0x333333,
	myTextColor = 0xFFFFFF,
	mySubTextColor = 0xFFFFFF,
	Tooltip = "true",
	myScrollColor = 0x232323,
	myArrowColor = 0xFFFFFF,
	myLoadBarColor = 0x232323,
	Border = "square",
	MaskScene = "false",
	MaskWidth = 600,
	shownPicture = 5,
	Scrollbar = "permanent");
}

// Reset Scene
function ResetScene(){
	// Remove Mouse Listener in PictureFlow
	Mouse.removeListener(PFlow.myMO);
	PFlow.stopAutomatik();
	myMCL.unloadClip(PFlow);
}

// action des boutons // Button actions
I_btn.onRelease = function(){
	loadPF("one.xml");
}
II_btn.onRelease = function(){
	loadPF("two.xml");
}
III_btn.onRelease = function(){
	loadPF("three.xml");
}
IV_btn.onRelease = function(){
	loadPF("four.xml");
}

play_btn.onRelease = function(){
	PFlow.SlideOn = true; // Slideshow State
	PFlow.startAutomatik(); // Start Slideshow
}

stop_btn.onRelease = function(){
	PFlow.stopAutomatik(); // Stop Slideshow
}

prev_btn.onRelease = function(){
	if(PFlow.i_show > 1){
		PFlow.deplace_D(1); // Go right
	}
}

next_btn.onRelease = function(){
	if(PFlow.i_show < PFlow.n_image){
		PFlow.deplace_G(1); // Go left
	}
}

// Chargement du clip par défaut // Default Clip loading at start
loadPF("default.xml");

A propos de cet article