private var __listData:BaseListData;
// Make the listData property bindable.
[Bindable("dataChange")]
{
return __listData;
}
{
__listData = value;
}
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of Webdevotion
Sent: vrijdag 21 april 2006 12:40
To: [email protected]
Subject: [flexcoders] Re: DataGridItemRenderer with AS3Isn't there anyone with some tips on this topic ?
On 4/20/06, Webdevotion <[EMAIL PROTECTED]> wrote:Hello,
I'm trying to create a datagriditemrenderer using Actionscript.
I know I'm importing to much right now, it's for testing purposes ; )
Does anyone have some insight into this techniques ?
All I am seeing now is false in the cells of my datagrid.
Another question: I can't use addChildAt, but I want to
place some png files into the renderer. How do I do this ?
Thanks!
My code:
package{
import flash.display.*;
import flash.events.*;
import flash.util.*;
import mx.core.*;
import mx.controls.dataGridClasses.DataGridItemRenderer;
import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.Label;
public class Rating extends DataGridItemRenderer{
// embed the solid start
[Embed (source='assets/star.png')]
private var Star:Class;// embed the solid start
[Embed (source='assets/star_empty.png')]
private var StarEmpty:Class;
private var myListData:DataGridListData;
private var ratingLabel:Label;
public function Rating()
{
super();
var pic:Bitmap;
var i:int;
myListData = DataGridListData(listData);
for(i=0;i<data;i++)
{
if((i+1)<=data)
{
pic = new Star();
}else{
pic = new StarEmpty();
}
pic.x = i*25;
//this.addChildAt( pic,i );
}
ratingLabel = new Label();
ratingLabel.text = "data.rating";
}
}
}
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

