Events
onOpen
Methods
setThumbnailDimension
setImageDimension
addItem
loadFromXML
loadItems
setEasing
setZoomSpeed
clearItems
getItems
openItem
closeItem
Properties
zoom_speed
Flash Player 9
Event; called when an item is opened. Event is dispatched to the component.
function onOpen(e:Object) {
trace('item clicked '+e.item.name)
}
gridNavigation.addEventListener("onOpen", onOpen);
Flash Player 9
Event; called when an item finnished to open. Event is dispatched to the component.
var listener = new Object();
listener.onOpenComplete = function(){
trace ("gridNavigation item open complete"); // type event action here.
}
gridNavigation.addEventListener("onOpenComplete", listener.onOpenComplete);
Flash Player 9
Event; called when an item is closed. Event is dispatched to the component.
var listener = new Object();
listener.onClose = function(){
trace ("gridNavigation item close"); // type event action here.
}
gridNavigation.addEventListener("onClose", listener.onClose);
Flash Player 9
Event; called when an item finnished to close. Event is dispatched to the component.
var listener = new Object();
listener.onCloseComplete = function(){
trace ("gridNavigation item close complete"); // type event action here.
}
gridNavigation.addEventListener("onCloseComplete", listener.onCloseComplete);
Flash Player 9
Event; called when the item finnished to close. Event is dispatched to the grid item.
var listener = new Object();
listener.onItemOpenComplete = function(){
clip_mc.play();
trace ("gridNavigation item open complete"); // type event action here.
}
this.parent.addEventListener("onItemOpenComplete", listener.onItemOpenComplete);
Flash Player 9
Event; called when the item is about to close. Event is dispatched to the grid item.
var listener = new Object();
listener.onItemClose = function(){
clip_mc.play();
trace ("gridNavigation item close complete"); // type event action here.
}
this.parent.addEventListener("onItemClose", listener.onItemClose);
Flash Player 9
Event; called when an item finnished to opem. Event is dispatched to the grid item.
var listener = new Object();
listener.onItemOpenComplete = function(){
clip_mc.gotoAndStop(1);
trace ("gridNavigation item close complete"); // type event action here.
}
this.parent.addEventListener("onItemOpenComplete", listener.onItemOpenComplete);
Flash Player 9
Event; called when an item is about to close. Event is dispatched to the grid item.
var listener = new Object();
listener.onItemClose = function(){
clip_mc.gotoAndStop(1);
trace ("gridNavigation item close complete"); // type event action here.
}
this.parent.addEventListener("onItemClose", listener.onItemClose);
Flash Player 9
Method; set the thumbnail image dimension. If the thumbnail image size is different, the image will be resized.
gridNavigation.setThumbnailDimension(100, 50);
Flash Player 9
Method; set the big image dimension. If the image size is different, the image will be resized.
gridNavigation.setImageDimension(300, 200);
Flash Player 9
Method; add a photo item to the component. First variable is thumbnail, the second variable is the big image.
gridNavigation.addItem("data/images/thm/1.jpg", "data/images/img/1.jpg");
gridNavigation.addItem("data/images/thm/2.jpg", "data/images/img/2.jpg");
Flash Player 9
Method; loads an XML file which contains all component the variables and initialize the component. The variables in the component inspector will be ignored.
gridNavigation.loadFromXML("data/gridNavigation.xml");
Flash Player 9
Method; initialize the component. Image items can be set using addItem method.
gridNavigation.loadItems();
Flash Player 9
Method; change the component zoom speed. The value is in miliseconds. The parameter is a positive integer.
gridNavigation.setZoomSpeed(5000);
Flash Player 9
Method; changes the easing equation. Possible values are
easenone,linear,easeinquad,easeoutquad,easeinoutquad,easeoutinquad,easeincubic,easeoutcubic,
easeinoutcubic,easeoutincubic,easeinquart,easeoutquart,easeinoutquart,easeoutinquart,easeinquint,
easeoutquint,easeinoutquint,easeoutinquint,easeinsine,easeoutsine,easeinoutsine,easeoutinsine,
easeincirc,easeoutcirc,easeinoutcirc,easeoutincirc,easeinexpo,easeoutexpo,easeinoutexpo,easeoutinexpo,
easeinelastic,easeoutelastic,easeinoutelastic,easeoutinelastic,easeinback,easeoutback,easeinoutback,
easeoutinback,easeinbounce,easeoutbounce,easeinoutbounce,easeoutinbounce
gridNavigation.setEasing('linear');
Flash Player 9
Method; removes all the items from the component.
gridNavigation.clearItems();
Flash Player 8
Method; gets the array of all items
gridNavigation.addEventListener("onComponentInit", init);
function init(){
var items_mc = gridNavigation.getItems();
items_mc[1].openItem();
}
Flash Player 8
Method; opens a specific item, after the array of items has been obtained using getItems
gridNavigation.addEventListener("onComponentInit", init);
function init(){
var items_mc = gridNavigation.getItems();
}
button1.onRelease = function(){
items_mc[1].openItem();
}
Flash Player 8
Method; closes the currently open item
closeButton.onRelease = function(){
gridNavigation.closeItem();
}
Inside a movie clip you would use:
close_btn.onRelease = function(){
this._parent._parent.closeItem();
}
Flash Player 9
Property; controls the animation speed when items are opened and closed. The value is in miliseconds.
The default value is 500.
gridNavigation.zoom_speed = 300;
Flash Player 9
Property; controls how the items are arranged on the stage. Possible values are Top Right, Top Left, Bottom Right, Bottom Left.
gridNavigation.layout_style = "Top Right";
Flash Player 9
Property; specifies the number of rows. If the value is 0, the component will automatically choose the number or rows.
gridNavigation.component_rows = 3;
Flash Player 9
Property; specifies the number of columns. If the value is 0, the component will automatically choose the number or columns.
gridNavigation.component_columns = 4;
Flash Player 9
Property; controls the navigation mode. Possible values are Pyramid, Grid.
gridNavigation.navigation_mode = "Pyramid";