Link to home
Start Free TrialLog in
Avatar of conagraman
conagramanFlag for United States of America

asked on

adding images to the dataGrid component using AS3-- without flex or external .as

i am trying to tackle the datagrid component.
 i can load data and add rows the way i want to, but now i am trying to add images/UILoader components to the datagrid component items. i am not using flex and want to keep all of the code on the timeline.( i just dont like using external .as files.)  i should mention i am using AS3.

here is a link to an example of what i want to do- but i need to do it on the timeline
http://kirill-poletaev.blogspot.com/2011/01/as3-datagrid-component-part-11.html

the part im struggling with is converting the loaderCellRenderer class from the example.

i have been going through the classes documentation for the cellrenderer, icellrenderer etc.. but just cant get my head around it.

can anyone please try and explain it to me or point me in the right direction?
Avatar of tomaugerdotcom
tomaugerdotcom
Flag of Canada image

I'm confused about what you're trying to do. My understanding from your post is that you want to basically create this at design time by dragging a datagrid component to the stage and then dragging your images into it?


t
Avatar of conagraman

ASKER

sorry if i want clear. yes. i want to add data and pictures to a datagrid at runtime.   the trick is i want to keep all of the code on the timeline.            - at this point i am about to give up on it. i am not sure if it can be done.    
I know how you can create AS file with DataGrid in the Flash Builder without using MXML
can you add pics at the same time? without mxml and without a custom external class?
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you don't want to use external AS file you can try to add ActionScript into CellRenderer Libray skins
For example inside "CellRenderer_upSkin"
http://www.adobe.com/devnet/flash/quickstart/datagrid_pt3.html

But I cannot understand why you cannot compile as normal way with AS files?
you are correct.
i ended up just creating a loop that adds the needed objects to the stage with the data.  i could use as files but i just like not having to.

thanks for the comments