Is it possible to change the focus in the Datagrid through ActionScript? Right now, I have a Datagrid with a list of external .flv's. When the user selects one, the video begins playing. I would like to create a "next" and "last" button that will change focus on the Datagrid and play the video. Here is what I currently have to play a selected video.
PHP Code:
function cellPress(evt_obj:Object) {
var item = mydgrid.selectedItem;
tt( mydgrid.selectedItem.name);
var fName = mydgrid.selectedItem.name
playMovie(fName);
};
May try this (I added also a "previous" and "fisrt" buttons functionality.. Just in case you may need them):
Use it in a frame eg.1 of your main -root- clip. Requires 4 buttons, in this example named: "nextButton", "previousButton", "firstButton", "lastButton" ):
AS:
PHP Code:
function cellPress(evt_obj:Object) {
var item = mydgrid.selectedItem;
tt( mydgrid.selectedItem.name);
var fName = mydgrid.selectedItem.name
playMovie(fName);
trace(item.label+" "+mydgrid.selectedIndex)
};
// This allows for example the user to use the arrow keys to select a data grid item
mydgrid.addEventListener("change", cellPress)
Bookmarks