-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from haxenme/master
Last changes
- Loading branch information
Showing
37 changed files
with
2,400 additions
and
43 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package nme; | ||
#if (!nme_install_tool) | ||
#if (!nme_install_tool || display) | ||
|
||
|
||
import format.display.MovieClip; | ||
|
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
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,57 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project version="2"> | ||
<!-- Output SWF options --> | ||
<output> | ||
<movie outputType="Application" /> | ||
<movie input="" /> | ||
<movie path="project.nmml" /> | ||
<movie fps="30" /> | ||
<movie width="800" /> | ||
<movie height="600" /> | ||
<movie version="3" /> | ||
<movie minorVersion="0" /> | ||
<movie platform="NME" /> | ||
<movie background="#FFFFFF" /> | ||
</output> | ||
<!-- Other classes to be compiled into your SWF --> | ||
<classpaths> | ||
<class path="Source" /> | ||
</classpaths> | ||
<!-- Build options --> | ||
<build> | ||
<option directives="" /> | ||
<option flashStrict="False" /> | ||
<option mainClass="io.nme.samples.actuateexample" /> | ||
<option enabledebug="False" /> | ||
<option additional="" /> | ||
</build> | ||
<!-- haxelib libraries --> | ||
<haxelib> | ||
<library name="nme" /> | ||
<library name="actuate" /> | ||
</haxelib> | ||
<!-- Class files to compile (other referenced classes will automatically be included) --> | ||
<compileTargets> | ||
<!-- example: <compile path="..." /> --> | ||
</compileTargets> | ||
<!-- Assets to embed into the output SWF --> | ||
<library> | ||
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> --> | ||
</library> | ||
<!-- Paths to exclude from the Project Explorer tree --> | ||
<hiddenPaths> | ||
<!-- example: <hidden path="..." /> --> | ||
</hiddenPaths> | ||
<!-- Executed before build --> | ||
<preBuildCommand /> | ||
<!-- Executed after build --> | ||
<postBuildCommand alwaysRun="False" /> | ||
<!-- Other project options --> | ||
<options> | ||
<option showHiddenPaths="False" /> | ||
<option testMovie="Custom" /> | ||
<option testMovieCommand="" /> | ||
</options> | ||
<!-- Plugin storage --> | ||
<storage /> | ||
</project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,90 @@ | ||
import com.eclecticdesignstudio.motion.Actuate; | ||
import com.eclecticdesignstudio.motion.easing.Quad; | ||
import nme.display.Sprite; | ||
import nme.events.Event; | ||
import nme.Lib; | ||
|
||
|
||
class Main extends Sprite { | ||
|
||
|
||
public function new () { | ||
|
||
super (); | ||
|
||
initialize (); | ||
construct (); | ||
|
||
} | ||
|
||
|
||
private function animateCircle (circle:Sprite):Void { | ||
|
||
var duration = 1.5 + Math.random () * 4.5; | ||
var targetX = Math.random () * Lib.current.stage.stageWidth; | ||
var targetY = Math.random () * Lib.current.stage.stageHeight; | ||
|
||
Actuate.tween (circle, duration, { x: targetX, y: targetY }, false).ease (Quad.easeOut).onComplete (animateCircle, [ circle ]); | ||
|
||
} | ||
|
||
|
||
private function construct ():Void { | ||
|
||
for (i in 0...80) { | ||
|
||
var creationDelay = Math.random () * 10; | ||
Actuate.timer (creationDelay).onComplete (createCircle); | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
private function createCircle ():Void { | ||
|
||
var size = 5 + Math.random () * 35 + 20; | ||
var circle = new Sprite (); | ||
|
||
circle.graphics.beginFill (Std.int (Math.random () * 0xFFFFFF)); | ||
circle.graphics.drawCircle (0, 0, size); | ||
circle.alpha = 0.2 + Math.random () * 0.6; | ||
circle.x = Math.random () * Lib.current.stage.stageWidth; | ||
circle.y = Math.random () * Lib.current.stage.stageHeight; | ||
|
||
addChildAt (circle, 0); | ||
animateCircle (circle); | ||
|
||
} | ||
|
||
|
||
private function initialize ():Void { | ||
|
||
Lib.current.stage.addEventListener (Event.ACTIVATE, stage_onActivate); | ||
Lib.current.stage.addEventListener (Event.DEACTIVATE, stage_onDeactivate); | ||
|
||
} | ||
|
||
|
||
|
||
|
||
// Event Handlers | ||
|
||
|
||
|
||
|
||
private function stage_onActivate (event:Event):Void { | ||
|
||
Actuate.resumeAll (); | ||
|
||
} | ||
|
||
|
||
private function stage_onDeactivate (event:Event):Void { | ||
|
||
Actuate.pauseAll (); | ||
|
||
} | ||
|
||
|
||
} |
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,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project> | ||
|
||
<meta title="Actuate Example" package="io.nme.samples.actuateexample" version="1.0.0" company="NME" /> | ||
<app main="Main" path="Export" file="ActuateExample" /> | ||
|
||
<source path="Source" /> | ||
|
||
<haxelib name="nme" /> | ||
<haxelib name="actuate" /> | ||
|
||
<assets path="Assets" rename="assets" exclude="nme.svg" /> | ||
<icon path="Assets/nme.svg" /> | ||
|
||
</project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,57 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project version="2"> | ||
<!-- Output SWF options --> | ||
<output> | ||
<movie outputType="Application" /> | ||
<movie input="" /> | ||
<movie path="project.nmml" /> | ||
<movie fps="30" /> | ||
<movie width="800" /> | ||
<movie height="600" /> | ||
<movie version="3" /> | ||
<movie minorVersion="0" /> | ||
<movie platform="NME" /> | ||
<movie background="#FFFFFF" /> | ||
</output> | ||
<!-- Other classes to be compiled into your SWF --> | ||
<classpaths> | ||
<class path="Source" /> | ||
</classpaths> | ||
<!-- Build options --> | ||
<build> | ||
<option directives="" /> | ||
<option flashStrict="False" /> | ||
<option mainClass="io.nme.samples.herokushaders" /> | ||
<option enabledebug="False" /> | ||
<option additional="" /> | ||
</build> | ||
<!-- haxelib libraries --> | ||
<haxelib> | ||
<library name="nme" /> | ||
<library name="actuate" /> | ||
</haxelib> | ||
<!-- Class files to compile (other referenced classes will automatically be included) --> | ||
<compileTargets> | ||
<!-- example: <compile path="..." /> --> | ||
</compileTargets> | ||
<!-- Assets to embed into the output SWF --> | ||
<library> | ||
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> --> | ||
</library> | ||
<!-- Paths to exclude from the Project Explorer tree --> | ||
<hiddenPaths> | ||
<!-- example: <hidden path="..." /> --> | ||
</hiddenPaths> | ||
<!-- Executed before build --> | ||
<preBuildCommand /> | ||
<!-- Executed after build --> | ||
<postBuildCommand alwaysRun="False" /> | ||
<!-- Other project options --> | ||
<options> | ||
<option showHiddenPaths="False" /> | ||
<option testMovie="Custom" /> | ||
<option testMovieCommand="" /> | ||
</options> | ||
<!-- Plugin storage --> | ||
<storage /> | ||
</project> |
Oops, something went wrong.