Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

创建带图片链接菜单报错

$
0
0

@Holmes 写道:

//add start menu

	cc.MenuItemFont.setFontName("FirstMenu");
	cc.MenuItemFont.setFontSize(20);
	var item1 =  cc.MenuItemFont.create("Start",function(){},this);
            //就下面这个item2 一创建就报这个错
              //CCSprite.js:2653 Uncaught TypeError: Cannot read property 'use' of null
	var item2 = cc.MenuItemImage.create("res/start_N.png","res/start_N.png");
	var menu =  cc.Menu.create(item1,item2);
	menu.alignItemsVertically();
	this.addChild(menu);

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>