Hi
I had requirement that i don't want the combobox associated with the SimpleChat component and the text "user typing" is there anyway to hide those.?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
My advice for your case would be to build your own simpleChat UI with the simpleChatModel we provide and you can have the freedom for doing whatever UI you want. Our SimpleChat example in samepleApps folder builds a chat UI using the SimpleChatModel.
However, if you feel to go the quick fix route, you can simply override the createChildren or other functions in your CustomSimpleChat subclass of SimpleChat and use that to visible/hide any component. You can look at the source code for player 9 in SimpleChat for more details. Its helpful as a reference in many cases even if you are using player 10 swc.
For your specific case, you can do this in your subclass
Override protected function createChildren():void
{
super.createChildren();
if(_toCombo) {
_toCombo.visible = false ; // for making combobox invisible
}
}
Override protected function commitProperties():void
{
super.commitProperties();
if (_typingLabel) {
_typingLabel.visible = false; // for making typing label invisible
}
}
Thanks
Regards
Hironmay Basu
Views
Replies
Total Likes
Hi,
My advice for your case would be to build your own simpleChat UI with the simpleChatModel we provide and you can have the freedom for doing whatever UI you want. Our SimpleChat example in samepleApps folder builds a chat UI using the SimpleChatModel.
However, if you feel to go the quick fix route, you can simply override the createChildren or other functions in your CustomSimpleChat subclass of SimpleChat and use that to visible/hide any component. You can look at the source code for player 9 in SimpleChat for more details. Its helpful as a reference in many cases even if you are using player 10 swc.
For your specific case, you can do this in your subclass
Override protected function createChildren():void
{
super.createChildren();
if(_toCombo) {
_toCombo.visible = false ; // for making combobox invisible
}
}
Override protected function commitProperties():void
{
super.commitProperties();
if (_typingLabel) {
_typingLabel.visible = false; // for making typing label invisible
}
}
Thanks
Regards
Hironmay Basu
Views
Replies
Total Likes
Hi Hironmay Basu,
Thank You for quick replay.I tried in both ways you mentioned one is simplechatmodel and onther is Overriding the methods.Both are working fine.
Just one more clarification that if we want to chage the userrole to owner generally i used to do send request to my java class there i am changing the user role to owner by using my Developer credentials.I tried to do samething using actionscript but i didn't get any equal method.like in java i am using the follwing metohds
accountmanager.getSession(roomname);
authsession.getAuthenticationToken(secret, studentname, id,100);
the samething i want using actionscript is there anyway ?
Thank you once again.
Thanks & Regards
Sudhakar Reddy
Views
Replies
Total Likes
Hi Sudhakar,
If you want to change the userRole of someone to Owner, you can use UserManager's setUserRole method with userID of that user and desired role. Note that you need to login as owner credentials to change other's user roles. The API doc will make more clear.
Hope this helps.
Regards
Hironmay Basu
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies