Dynamic xml list - enabling scrollbar

Some of you may wonder how to activate my as2 scrollbar class to navigate the dynamic list i posted yesterday.

It is quite simple. Download the package here, unpack it and put the scrollbar.as file in the project folder.

Now just paste the scrollbar movieclip in the dynamic xml list fla, take a few minutes to change it to fit the design, and the change the buildList function as below.

function buildList() {

[...]

downBtn.onRelease = function () {
offset += 1;
adjustList();
}

upBtn.onRelease = function () {
offset -= 1;
adjustList();
}

scrollbar.setDragged(this.container); // the dragged object
scrollbar.setRuler(scrollbar.ruler); // the ruler
scrollbar.setBackground(scrollbar.sfondo); // the scrollbar background
scrollbar.setMaschera(this.maschera); // the mask used in the fla
scrollbar.setTweenSpeed(25); // Tween velocity for dragging
scrollbar.setMouseWheelAdd(10); // Mouse wheel increment
scrollbar.init(); // start!

}

Now test the swf and be amazed!

Hope this will help some of you! Enjoy!

Michele said,

May 17, 2008 @ 11:48 pm

Ciao,
Premesso che sono troppo indietro con le moderne tecnologie dei browser.
Sapresti darmi un consiglio su come realizzare
un imput dumper per quest’accrocco qui in dhtml:

http://engineofcreation.altervista.org/jsGames/jsMarioBros/jsMarioBros.htm

Il problema è che l’onKeyPressed mi viene catturato dall’onKeyDown :)

fleshMaker said,

May 18, 2008 @ 3:53 pm

ciao michele! grazie per la visita a fuoridalcerchio! purtroppo non mi intendo tantissimo di videogiochi in dhtml e javascript. se vuoi posso indirizzarti a modi per realizzare la stessa cosa nello stesso modo (o anche meglio se ti và di perderci un pò di tempo) in flash :)
se vuoi avere un’idea e se non sai niente di flash, prova a dare uno sguardo ai tre tutorial sullo sviluppo di videogiochi che sto scrivendo! magari vieni ispirato! a presto

Michele said,

May 19, 2008 @ 9:21 am

Grazie mille.
E’ che ho l’allergia verso i grossi tools a pagamento che vogliono imporsi come standard
sul web. Anche se flash è la soluzione ottima per fare questi lavori.
p.s.
I tuoi lavori sono splendidi

RSS feed for comments on this post · TrackBack URI

Leave a Comment