Avatar of conagraman
conagraman
Flag 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?
Adobe FlashScripting Languages

Avatar of undefined
Last Comment
conagraman

8/22/2022 - Mon
tomaugerdotcom

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
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.    
dgofman

I know how you can create AS file with DataGrid in the Flash Builder without using MXML
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
conagraman

ASKER
can you add pics at the same time? without mxml and without a custom external class?
ASKER CERTIFIED SOLUTION
dgofman

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
dgofman

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?
conagraman

ASKER
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
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.