Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17124

How to load static html files from resources folder?

$
0
0

@DKBHOI wrote:

I load static html file from resources folder as bellow in cocos2d-x c++. How can I do this in cocos2d-js.

 auto webView = cocos2d::experimental::ui::WebView::create();
 webView->setPosition(visibleSize/2);
 webView->setContentSize(visibleSize);
 webView->loadFile("info.html");
 webView->setScalesPageToFit(true);
 this->addChild(webView);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17124

Latest Images

Trending Articles



Latest Images