方法一:使用定时器和ScrollView来实现
//定时器启动
schedule(schedule_selector(LoginScene::scheduleNotice), 0.01f);
//停止
unschedule(schedule_selector(LoginScene::scheduleNotice));
//----------喇叭---------------
void LoginScene::scheduleNotice(float t)
{
Widget* pNotice = static_cast<Widget *>(this->csb->getChildByName("notice"));
pNotice->setTouchEnabled(false);
ui::ScrollView* pScroll = static_cast<ui::ScrollView *>(pNotice->getChildByName("sv_notice"));
pScroll->setTouchEnabled(false);
Widget* pWidget = static_cast<Widget *>(pScroll->getChildByName("Panel_txt"));
pWidget->setTouchEnabled(false);
//pScroll->setDirection(SCROLLVIEW_DIR_HORIZONTAL);
Text* pLabel = static_cast<Text *>(pWidget->getChildByName("txt_notice"));
int nTextLen = 0;
if (pLabel){
nTextLen = pLabel->getString().length();
}
float width1 = pWidget->getContentSize()