Skip to content

Commit 484e21f

Browse files
Revert "Initial commit"
This reverts commit ba3df87.
1 parent ba3df87 commit 484e21f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+899
-949
lines changed

.DS_Store

-6 KB
Binary file not shown.

045inprogress.zip

-406 KB
Binary file not shown.

assets/character.png

-230 KB
Binary file not shown.

assets/hair1.png

-42.1 KB
Binary file not shown.

assets/hair2.png

-42.1 KB
Binary file not shown.

assets/map1.html

-26
This file was deleted.

assets/mashine.gif

-7.98 KB
Binary file not shown.

assets/nohair.png

-37.1 KB
Binary file not shown.

fonts/Cooper Black.eot

-50.6 KB
Binary file not shown.

fonts/Cooper Black.otf

-33.5 KB
Binary file not shown.

fonts/Cooper Black.ttf

-50.4 KB
Binary file not shown.

images/back.jpg

-158 KB
Binary file not shown.

images/background-tree.png

-949 KB
Binary file not shown.

images/buttons.png

-14.4 KB
Binary file not shown.

images/candy-left-long.png

-9.66 KB
Binary file not shown.

images/candy-left-middle.png

-9.19 KB
Binary file not shown.

images/candy-left-short.png

-8.3 KB
Binary file not shown.

images/candy-right-long.png

-9.51 KB
Binary file not shown.

images/candy-right-middle.png

-9.01 KB
Binary file not shown.

images/candy-right-short.png

-8.42 KB
Binary file not shown.

images/deer.png

-19.4 KB
Binary file not shown.

images/gift-left.png

-5.6 KB
Binary file not shown.

images/gift-right.png

-5.66 KB
Binary file not shown.

images/score-control.png

-25 KB
Binary file not shown.

js/.DS_Store

0 Bytes
Binary file not shown.

js/FlashJS/flashCollisionManager.js

-66
This file was deleted.

js/FlashJS/flashDisplayObject.js

+15-79
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
flash.namespace('flash.display.DisplayObject');
22

3+
4+
35
flash.display.DisplayObject = (function(window, undefined){
46
function DisplayObject(DOMObject){
57

@@ -19,21 +21,12 @@ flash.display.DisplayObject = (function(window, undefined){
1921
if(DOMObject){
2022
var object = $(DOMObject);
2123
} else {
22-
try{
23-
var objectsNumber = flash.stage.objectsNumber;
24-
} catch(e){
25-
var objectsNumber = -1;
26-
}
27-
var object = $('<div/>', {'id': objectsNumber ,'style': 'position: absolute;'});
28-
object.id = objectsNumber;
29-
var objectsNumber = -1;
24+
var object = $('<div/>', {'id': _.uniqueId() ,'style': 'position: absolute;'});
3025
}
3126

3227
object.angleCache = (0);
3328
object.scaleXCache = (1);
3429
object.scaleYCache = (1);
35-
object.xCache = (0);
36-
object.yCache = (0);
3730
object.childs = [];
3831

3932
//Listeners initialization
@@ -52,19 +45,20 @@ flash.display.DisplayObject = (function(window, undefined){
5245

5346
//X, Y getters / setters
5447
objGetSet.xGet = function(){
55-
return parseInt(this[0].style['left']);
48+
return parseInt(this.css('left'));
5649
}
5750
objGetSet.xSet = function(x){
58-
this[0].style['left']= flash.utils.numToPx(x);
51+
this.css('left', flash.utils.numToPx(x));
5952
if (flash.stage != undefined && this === flash.stage.cameraTarget){
6053
flash.stage.x = (-x + flash.stage.width * 0.5) * flash.stage.scaleX;
6154
}
6255
}
6356
objGetSet.yGet = function(){
64-
return parseInt(this[0].style['top']);
57+
return parseInt(this.css('top'));
6558
}
6659
objGetSet.ySet = function(y){
67-
this[0].style['top'] = flash.utils.numToPx(y);
60+
//console.log("top" + this.css('top'));
61+
this.css('top', flash.utils.numToPx(y));
6862
if (flash.stage != undefined && this === flash.stage.cameraTarget){
6963
flash.stage.y = (-y + flash.stage.height * 0.5) * flash.stage.scaleY;
7064
}
@@ -97,33 +91,33 @@ flash.display.DisplayObject = (function(window, undefined){
9791

9892
//Opacity
9993
objGetSet.alphaGet = function(){
100-
return this[0].style['opacity'] * 100;
94+
return this.css('opacity') * 100;
10195
}
10296
objGetSet.alphaSet = function(x){
103-
this[0].style['opacity'] = x / 100;
97+
this.css('opacity', x / 100);
10498
}
10599

106100
//Fill color
107101
objGetSet.fillColorGet = function(){
108-
return this[0].style['backgroundColor'];
102+
return this.css('background-color');
109103
}
110104
objGetSet.fillColorSet = function(x){
111-
this[0].style['backgroundColor'] = x;
105+
this.css('background-color', x);
112106
}
113107

114108
//Visible
115109
objGetSet.visibleGet = function(){
116-
if (this[0].style['display'] === 'none'){
110+
if (this.css('display') === 'none'){
117111
return false;
118112
} else {
119113
return true;
120114
}
121115
}
122116
objGetSet.visibleSet = function(x){
123117
if (x === true){
124-
this[0].style['display'] = 'inline';
118+
this.css('display', 'inline');
125119
} else {
126-
this[0].style['display'] = 'none';
120+
this.css('display', 'none');
127121
}
128122
}
129123

@@ -147,51 +141,6 @@ flash.display.DisplayObject = (function(window, undefined){
147141
this.refreshCSSTransform();
148142
}
149143

150-
objGetSet.setMask = function(displayObject){
151-
if (displayObject === undefined){
152-
this.maskObject.isMask = false;
153-
this.maskObject = undefined;
154-
return;
155-
}
156-
157-
this.maskObject = displayObject;
158-
this.maskObject.isMask = true;
159-
160-
if (this.maskObject._graphics === undefined) return;
161-
162-
var dataurl = this.maskObject._graphics.canvas.toDataURL();
163-
164-
if ((this.dataurl && this.dataurl.length !== dataurl.length) || this.dataurl === undefined) {
165-
166-
this[0].style['-webkit-mask-box-image'] = 'url(' + dataurl + ')';
167-
this.dataurl = dataurl;
168-
/*
169-
if (this.tempstyle1 === undefined) {
170-
if (this.tempstyle2 !== undefined) {
171-
this.tempstyle2.remove();
172-
this.tempstyle2 = undefined;
173-
}
174-
this.tempstyle1 = $("<style type='text/css'> .tempstyle1{ -webkit-mask-box-image:" + 'url(' + dataurl + ')' + ";} </style>").appendTo("head");
175-
this.className = 'tempstyle1';
176-
} else {
177-
this.tempstyle1.remove();
178-
this.tempstyle1 = undefined;
179-
this.tempstyle2 = $("<style type='text/css'> .tempstyle2{ -webkit-mask-box-image:" + 'url(' + dataurl + ')' + ";} </style>").appendTo("head");
180-
this.className = 'tempstyle2';
181-
}
182-
183-
*/
184-
}
185-
}
186-
187-
188-
189-
objGetSet.getMask = function(){
190-
return this.maskObject;
191-
}
192-
193-
//Mask
194-
defineGetterSetter(object, "mask", objGetSet.getMask, objGetSet.setMask);
195144

196145
//numChildren getter
197146
defineGetterSetter(object, "numChildren", objGetSet.numChildrenGet, function(x){});
@@ -220,16 +169,6 @@ flash.display.DisplayObject = (function(window, undefined){
220169
defineGetterSetter(object, "scaleX", objGetSet.scaleXGet, objGetSet.scaleXSet);
221170
defineGetterSetter(object, "scaleY", objGetSet.scaleYGet, objGetSet.scaleYSet);
222171

223-
//Graphics
224-
// Visible
225-
defineGetterSetter(object, "graphics", function(){
226-
if (this._graphics === undefined){
227-
return flash.display.Graphics(this);
228-
} else {
229-
return this._graphics;
230-
}
231-
}, function (x){});
232-
233172
//CSS transform refresh function to update rotation, scale and potentially skew
234173
object.refreshCSSTransform = function(){
235174
flash.display.cssTransformFunction.call(this, this.angleCache, this.scaleXCache, this.scaleYCache);
@@ -280,9 +219,6 @@ flash.display.DisplayObject = (function(window, undefined){
280219
}
281220

282221
object.addEventListener = object.bind;
283-
object.dispatchEvent = function (eventObject){
284-
object.trigger(eventObject.type);
285-
}
286222

287223
object.x = 0;
288224
object.y = 0;

js/FlashJS/flashEvents.js

+1-28
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,10 @@ flash.events.Event = {
66
RESIZE : 'resize'
77
}
88

9-
flash.events.IOErrorEvent = {
10-
IO_ERROR : 'ioerror'
11-
}
12-
13-
flash.events.LoadingManagerEvent = {
14-
ALL_COMPLETED : 'allcompleted',
15-
HAVE_ACTIVE : 'haveactive'
16-
}
17-
189
flash.namespace('flash.events.MouseEvent');
1910

2011
flash.events.MouseEvent = {
21-
CLICK : "click",
22-
MOUSE_MOVE : "mousemove",
23-
MOUSE_DOWN : "mousedown",
24-
MOUSE_UP : "mouseup",
25-
MOUSE_OUT : "mouseout",
26-
MOUSE_OVER : "mouseover"
12+
CLICK : "click"
2713
}
2814

2915
flash.events.KeyboardEvent = {
@@ -36,20 +22,7 @@ flash.events.KeyboardEvent = {
3622
SPACEBAR_CODE : 32
3723
}
3824

39-
function jqMouseEventToFlashMouseEvent(e){
40-
e.localX = e.clientX;
41-
e.localY = e.clientY;
42-
e.stageX = flash.stage.mouseX;
43-
e.stageY = flash.stage.mouseY;
44-
e.delta = wheelDelta;
45-
}
46-
47-
IOErrorEvent = flash.events.IOErrorEvent;
48-
LoadingManagerEvent = flash.events.LoadingManagerEvent;
49-
5025
flash.extend(window.Event, flash.events.Event);
51-
flash.extend(window.IOErrorEvent, flash.events.IOErrorEvent);
52-
flash.extend(window.LoadingManagerEvent, flash.events.LoadingManagerEvent);
5326
flash.extend(window.MouseEvent, flash.events.MouseEvent);
5427
flash.extend(window.KeyboardEvent, flash.events.KeyboardEvent);
5528

js/FlashJS/flashGenericPreloader.js

-12
This file was deleted.

0 commit comments

Comments
 (0)