|
introducing scrollbar_light
by light i mean no images.
I do intend to now produce one with images for
skinablity.
the arguments for the scrollabr light are explained
int he source of the HTML example file (attached)
The attached HTML file goes in the /examples/
directory.
The attached JS file goes into the src/gui/
directory
I hope rar format is okay for everyone.. if not let
me know and I'll start using zip
Goddamn but this is very
frusterating..
It has been a very long time since I have done any
serious JS coding.
Not to mention that the new DynAPI is VERY
different.
Here is some stuff that should be added to the
docs.
Make any corrections nessesary.
-----------------start
here---------------------
Dragevents:
To test if a layer (myLayer) is being dragged: Each layer no longer has it's own 'dragging' property. To test is a layer is being dragged you check the isDragging property of the Dragevent engine (Dragevent.isDragging). To test if a specific layer is being dragged you check if the layer being dragged (DragEvent.dragevent.src) is the layer in question 2.x code:
if(myLayer.dragging){ your code here} 3x
code:
if(DragEvent.dragevent.isDragging&&DragEvent.dragevent.src="" your code here} --------------------
Responde to precreate/create event where the layer's variable name is myLayer: You no longer assign an event listener for these two events. Instead you pass a function to be execute at the precreate or create event. The passed function is executed as if it where a method of the layer in question. So, instead of getting the source of the event you simple use 'this' to refer to the layer upon which the function is being executed (onCreate/onPrecreate) 2.x code: var el = new EventListener(myLayer); el.onprecreate=function(e){ e.getSource().doSomething(); } el.oncreate=function(e){ e.getSource().doSomething(); } myLayer.addEventListener(el); 3x code:
var createCode = function(){ this.doSomething(); // note the use of 'this' to indicate the source of the create event } this.onCreate(createCode); var preCreateCode = function(){
this.doSomething(); // note the use of 'this' to indicate the source of the precreate event } this.onPrecreate(preCreateCode); --------------end here---------------
|
scrollbar_light.rar
Description: application/rar-compressed
