A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Applying style to a List component

Threaded View

  1. #1
    Member
    Join Date
    Sep 2007
    Posts
    69

    Applying style to a List component

    I'm trying to do this but I can't get rid of that ugly black Arial type the List items use by default.

    I've done it in two different ways, as seen on the internet:

    PHP Code:
    // first off I have to retrieve the reference to the list which I previously created
    _list this.getChildByName("playlist") as List;
    _list.setStyle("fontFamily""Century Gothic");
    _list.setStyle("letterSpacing"3);
    _list.setStyle("color"0x6666FF); 
    and this way I've seen in the Adobe documentation for setStyle (that example uses a Button label instead: http://help.adobe.com/en_US/AS3LCR/F...setStyle%28%29). This is what I've done following that method:

    PHP Code:
    _list this.getChildByName("playlist") as List;
    var 
    tf:TextFormat = new TextFormat();
    tf.color 0x6666FF;
    tf.letterSpacing 3;
    tf.font "Century Gothic";
    _list.setStyle("textFormat"tf); 
    Please how can I properly change the style of the text in the List??
    Last edited by Jazztronik; 11-09-2009 at 02:23 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center