FORUMS: list search recent posts

Appending Code by using arrays

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ryan Young
Appending Code by using arrays
on Jul 12, 2014 at 9:05:26 pm

I got a good question for someone who knows a lot about actionscript3. I have made a data grid which is being populated by a var object array and there is a total of 3 columns in it. The first and second columns already have all their data and the 3rd column I wanted to use for a user input that would allow me to save on to the [2] of each object variable. What I was hoping to do was use a side pane that when an Item is selected in the data grid, it shows [0]+[1] in a dynamic textbox and then like I said, allow the user to imput their own text in a input box that would update the code for the [2] item and save it so it stays that way. This is what I have so far.

import fl.controls.DataGrid;


var D01:Object = {Term:"Appurtenance",Definition:"Runs with the land - legal right or privilege attached to a property and inherited with it",Notes:" "};

var Dformat:TextFormat = new TextFormat();


var datagrid:DataGrid = new DataGrid;

datagrid.width = 480
datagrid.height = 800;
datagrid.rowHeight = 20;
datagrid.columns = ["Term","Definition"];

datagrid.resizableColumns = true;
datagrid.setRendererStyle("textFormat",Dformat);

function gridItemClick(event:Event):void{
definselect.text = event.target.selectedItem.Term + "\n" + "------------ " + "\n" + event.target.selectedItem.Definition;
gotoAndPlay(6);

\\\\\\\ This is what I was thinking would be in the realm of possibilities but it doesn't work

var Notes:SharedObject = SharedObject.getLocal

event.target.selectedItem.Notes.append = notesinput.text;

}
datagrid.addItem(D01);

addChild(datagrid);


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]