Skip to content
Browse files

Merge pull request #300 from linshun/iss1234_AlphaVersion

Add super init and fixed index note for alpha version
  • Loading branch information...
2 parents 4ff0c5c + 6014d90 commit 186a9fa9031d0d6c59471ea18890a6799562cfd1 @linshun linshun committed May 28, 2012
View
8 Demo/HelloDomMenu/HelloDom.js
@@ -60,11 +60,7 @@ var Helloworld = cc.Layer.extend({
var selfPointer = this;
//////////////////////////////
// 1. super init first
- /*var test = this._super();
- cc.LOG(test);
- if (!test) {
- return false;
- }*/
+ this._super();
var size = cc.Director.sharedDirector().getWinSize();
@@ -76,7 +72,7 @@ var Helloworld = cc.Layer.extend({
// add "HelloWorld" splash screen"
this.pSprite = cc.Sprite.spriteWithFile("Resources/HelloWorld.png");
- this.pSprite.setPosition(cc.ccp(cc.Director.sharedDirector().getWinSize().width / 2, cc.Director.sharedDirector().getWinSize().height / 2));
+ this.pSprite.setPosition(cc.ccp(size.width / 2, size.height / 2));
this.pSprite.setIsVisible(true);
this.pSprite.setAnchorPoint(cc.ccp(0.5, 0.5));
this.pSprite.setScale(0.5);
View
2 Demo/HelloWorldTutorial/Helloworld.js
@@ -55,6 +55,8 @@ var Helloworld = cc.Layer.extend({
var selfPointer = this;
//////////////////////////////
// 1. super init first
+ this._super();
+
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it.
View
6 Demo/NativeClientDemo/NativeClient.js
@@ -139,11 +139,7 @@ var Helloworld = cc.Layer.extend({
var selfPointer = this;
//////////////////////////////
// 1. super init first
- var test = this._super();
- cc.LOG(test);
- if (!test) {
- return false;
- }
+ this._super();
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
View
2 HelloWorld/Helloworld.js
@@ -35,6 +35,8 @@ var Helloworld = cc.Layer.extend({
//////////////////////////////
// 1. super init first
+ this._super();
+
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it.
View
2 index.html
@@ -59,7 +59,7 @@
<h2>Note</h2>
<div style = "width:800px">
<p>While games written with Cocos2d-html5 should work offline, but some browsers won't allow this to happen. Browsers that deny access to certain functions such as XMLHttpRequest that fails for "file:// " protocol, but Cocos2d-html5 engine depend on this to read many files such as a .plist file.</p>
-<p>Firefox 12, and Opera are notable exceptions.</p>
+<p>Some versions of Firefox, Safari and Opera are notable exceptions.</p>
<p>If you wish to use other browsers, you need a webserver. It doesn't mean a seperate computer, you can download a free webserver program to your computer. Here is some popular webserver program:
<ul><li><a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>: for windows, Mac, Linux</li><li><a href="http://www.wampserver.com/en/">WAMP</a>: for windows</li><li><a href="http://www.mamp.info/en/index.html">MAMP</a>: for Mac</li></ul>
Once you install a webserver, go to your installation directory, there should be a directory called "htdocs" or "www", place Cocos2d-html5 files in there. Then point your browser to http://localhost/.</p>

0 comments on commit 186a9fa

Please sign in to comment.
Something went wrong with that request. Please try again.