-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d6631a8
Showing
20 changed files
with
1,543 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<style type="text/css"> | ||
h1 { | ||
font-family: Arial, Helvetica, sans-serif; | ||
color: #F00; | ||
font-size: x-large; | ||
} | ||
p { | ||
font-family: Arial, Helvetica, sans-serif; | ||
color: #000; | ||
font-size: small; | ||
} | ||
body { | ||
background-color: #FFF; | ||
text-align: center; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
#bloctxt { | ||
border-left-width: 5px; | ||
border-left-style: solid; | ||
border-left-color: #F00; | ||
padding-left: 10px; | ||
position: absolute; | ||
left: 50%%; | ||
width: 600px; | ||
margin-left: -260px | ||
} | ||
</style> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
|
||
<!-- Enables full-screen on iOS devices --> | ||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" /> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> | ||
<meta name="HandheldFriendly" content="true" /> | ||
|
||
<title>Basic Platformer</title> | ||
|
||
<script> | ||
// Detection of old browsers that do not support the canvas element | ||
// Falls back to a default page | ||
if (!document.createElement("canvas").getContext) | ||
{ | ||
window.open("http://www.clickteam.com/html5-fallback", "_self"); | ||
} | ||
</script> | ||
|
||
|
||
<!-- EXTRASOURCES --> | ||
<!-- Loads the Javascript code...--> | ||
<script src="src/Runtime.js"></script> | ||
<script src=newgrounds.js></script> | ||
<script> | ||
|
||
"use strict"; | ||
|
||
var appID = "null"; | ||
var encryptionCipher = "null"; // AES-128 Base64 | ||
var debug = 0; | ||
|
||
function setAppID(newID){ | ||
appID = newID; | ||
} | ||
|
||
function setCipher(newCipher){ | ||
encryptionCipher = newCipher; | ||
} | ||
|
||
function setDebug(newDebug){ | ||
debug = newDebug; | ||
} | ||
|
||
function startNewgrounds(){ | ||
Newgrounds.Init(appID, encryptionCipher, debug); | ||
} | ||
|
||
function unlockMedal(id) | ||
{ | ||
Newgrounds.UnlockMedal(id); | ||
} | ||
|
||
function postScore(id, score) | ||
{ | ||
Newgrounds.PostScore(id, parseInt(input_score.value)); | ||
} | ||
|
||
</script> | ||
|
||
<script> | ||
|
||
// Detection of when the html file is ran locally. | ||
// You can remove this code for the final version | ||
if (window.location.protocol == "file:") | ||
{ | ||
document.write('<div id="bloctxt">'); | ||
document.write('<h1>The application cannot be run...</h1>'); | ||
document.write('<p>HTML browsers do not allow you to launch data files directly from the file system.<br>'); | ||
document.write('A drag & drop of the html file on a web-browser window will not work, on any machine.<br>'); | ||
document.write('Please use the Build & Run option (it opens a local web server) to run your application,<br>') | ||
document.write('or upload your application folder to a remote web-server, and start it from there...</p>'); | ||
document.write('</div>'); | ||
throw new error("Cannot run application"); | ||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
||
<div style="display: inline-block; -webkit-user-select: none; text-align: left;"> | ||
<canvas id="MMFCanvas" width="640" height="352"> | ||
Your browser does not support Canvas. | ||
</canvas> | ||
</div> | ||
|
||
<script> | ||
// RUNTIMESTART | ||
// This is where the HTML5 runtime is actually started | ||
window.addEventListener("load", windowLoaded, false); | ||
function windowLoaded() | ||
{ | ||
// Calls the runtime | ||
// First parameter : name of the canvas element | ||
// Second parameter : path to the cch file. Images and sounds must lay beside this file | ||
new Runtime("MMFCanvas", "resources/BasicPlatformer.cch"); | ||
} | ||
// RUNTIMESTARTEND | ||
</script> | ||
|
||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-Newgrounds.io API for Clickteam Fusion 2.5- | ||
|
||
|
||
This is a wrapper that makes use of a Javascript version of the Newgrounds API that was written by KilledByAPixel. | ||
|
||
|
||
|
||
To get started, read the included Newgrounds_API.pdf file. This contains information on the wrapper and how to set it up inside of Clickteam Fusion. | ||
|
||
|
||
BasicPlatformer.mfa is a small example which shows the API in action. Be sure to reference it if you are stuck. | ||
|
||
|
||
|
||
This implimentation will work with any version of Clickteam Fusion 2.5 (Free, Standard, or Developer). | ||
|
||
NOTE: If you have Fusion 2.5 Standard or Developer, you will need the HTML5 Export Module, since it contains the HTML5 object. The free version of the exporter that is bundled with Fusion will work as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<script src=newgrounds.js></script> | ||
<script> | ||
|
||
"use strict"; | ||
|
||
var appID = "null"; | ||
var encryptionCipher = "null"; // AES-128 Base64 | ||
var debug = 0; | ||
|
||
function setAppID(newID){ | ||
appID = newID; | ||
} | ||
|
||
function setCipher(newCipher){ | ||
encryptionCipher = newCipher; | ||
} | ||
|
||
function setDebug(newDebug){ | ||
debug = newDebug; | ||
} | ||
|
||
function startNewgrounds(){ | ||
Newgrounds.Init(appID, encryptionCipher, debug); | ||
} | ||
|
||
function unlockMedal(id) | ||
{ | ||
Newgrounds.UnlockMedal(id); | ||
} | ||
|
||
function postScore(id, score) | ||
{ | ||
Newgrounds.PostScore(id, parseInt(input_score.value)); | ||
} | ||
|
||
</script> |
Oops, something went wrong.