PDA

Volledige versie bekijken : Gallery foto's uitlezen directory


soundcraft
%Europe/Berlin %510 %2007, 13:15
Hey allemaal,

Ik ben bezig met de website: http://www.verplaatsingoudestationhouten.nl/
(ik test op: http://www.verplaatsingoudestationhouten.nl/test/ )
en nu heb ik een scriptje op internet gevonden en gedeeltijk aangepast zodat er foto's uit een gekozen directory automatisch worden weergeven (te zien op de pagina media)
Maar nu zou ik graag willen weten wat ik bij de actionscript moet toevoegen
zodat deze foto's aanklikbaar zijn en naar een grote foto linken (bepaalde movieclip of gewoon simpel naar de foto zelf)

Dit is de actionscript:

function fillPicsArray(ok)
{
if (ok)
{
var _loc2 = 0;
do
{
pics.push(this["f" + _loc2]);
} while (this["f" + ++_loc2] != undefined)
loadPic();
}
else
{
trace ("problem with the script");
} // end else if
} // End of the function
function onLoadInit(pic)
{
pic._width = 150;
pic._height = 100;
pic._x = 151 + 166 * ipic;
pic._y = 316;
pic._alpha = 100;
pic.filters = [picShadow];
if (++ipic < pics.length)
{
loadPic();
} // end if
} // End of the function
function loadPic()
{
holder.createEmptyMovieClip("p" + ipic, ipic);
holder["p" + ipic]._alpha = 0;
mcl.loadClip("files/" + pics[ipic], holder["p" + ipic]);
} // End of the function
function tweenToLeft()
{
if (ifarleft + 3 < pics.length)
{
new mx.transitions.Tween(holder, "_x", mx.transitions.easing.Strong.easeOut, holder._x, holder._x - 166, 1, true);
++ifarleft;
} // end if
} // End of the function
function tweenToRight()
{
if (ifarleft > 0)
{
new mx.transitions.Tween(holder, "_x", mx.transitions.easing.Strong.easeOut, holder._x, holder._x + 166, 1, true);
--ifarleft;
} // end if
} // End of the function
function init()
{
lv.onLoad = fillPicsArray;
lv.load("readfromdir.php");
mcl = new MovieClipLoader();
mcl.addListener(this);
ipic = 0;
ifarleft = 0;
this.createEmptyMovieClip("holder", 1);
picShadow = new flash.filters.DropShadowFilter();
picShadow.blurY = 3;
picShadow.blurX = 3;
picShadow.inner = false;
picShadow.angle = 45;
picShadow.distance = 5;
picShadow.color = 0;
picShadow.alpha = 20;
right.onRelease = mx.utils.Delegate.create(this, tweenToLeft);
left.onRelease = mx.utils.Delegate.create(this, tweenToRight);
} // End of the function
var lv = new LoadVars();
var pics = [];
var mcl;
var ipic;
var picShadow;
var ifarleft;
init();
stop();

CantGetRight
%Europe/Berlin %958 %2007, 23:59
onRelease gebruiken :)