Expand my Community achievements bar.

SOLVED

About Users' Icons Roster

Avatar

Former Community Member

Hi,may i change the host user icon,the audience user icon...of the Roster?Something like change the png sourcepath.or i must write a customRoster to change the icon.

I read the code in

Roster.as:

    public static var MENU_HOST_USER_ICON:Class;
 
  [Embed(source="rosterAssets/audienceMenuIcon.png")]

Have the icons source compiled in the swc and i can not change it.

any ideas~

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You can change the icons without having to recompile.  The lines below can be added wherever you are implementing the roster class.  Here I have changed the icon that is displayed for switching a users role to audiance in the sub menu when you role over a user in the roster list.  Just make sure the file is in your assets dir

[Embed(source="/assets/hostRosterIcon.png")]

var icon:Class;

Roster.MENU_AUDIENCE_USER_ICON = icon;

If you want to change the menu icons that are displayed next to the users name you will want to look into creating your own itemRenderer for the roster class. 

-chris

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

You can change the icons without having to recompile.  The lines below can be added wherever you are implementing the roster class.  Here I have changed the icon that is displayed for switching a users role to audiance in the sub menu when you role over a user in the roster list.  Just make sure the file is in your assets dir

[Embed(source="/assets/hostRosterIcon.png")]

var icon:Class;

Roster.MENU_AUDIENCE_USER_ICON = icon;

If you want to change the menu icons that are displayed next to the users name you will want to look into creating your own itemRenderer for the roster class. 

-chris

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----