Reputation: 1206
I use ActionScript3 in Flash Professional to build an animation in multiple frames.
The user has forward and back buttons to navigate between frames. At a certain time, I introduce a datagrid (inserted from the editor) fill it with data and everything goes OK.
//Example frame 9
stop();
r7.removeAllColumns()
r7.addColumn("column1");
r7.addColumn("column2");
r7.addColumn("column3");
r7.addItem({column1:"A", "column2":"a1", "comumn3":"1"});
r7.addItem({column1:"B", "column2":"b1", "comumn3":"1"});
But each time the user goes back to the previous frame (frame 9) from (frame 10), the datagrid is refilled with the same rows again.
I used removeAllColumns() because without it, the same columns are appended to the existing ones.
Still the issues of rows not solved.
Here is the illustration:
Upvotes: -1
Views: 87
Reputation: 1206
Neither removeAll() alone nor removeAllColumns() alone will work.
This is what solved my issue:
r7.removeAll();
r7.removeAllColumns();
Here is the tests:
1- Using only "removeAll()"
2- Using only "removeAllColumns()"
3- Using both "removeAll()" & "removeAllColumns()"
Upvotes: 0