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
package { | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.geom.Rectangle; | |
import starling.core.Starling; | |
public class Main extends Sprite { | |
public function Main():void { |
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
private var myText:TextField; // move the var to class-level | |
// if you create var inside function it not be visible in another function | |
private function init(e:Event = null):void { | |
removeEventListener(Event.ADDED_TO_STAGE, init); | |
trace('stage has been found') | |
stage.addEventListener(KeyboardEvent.KEY_DOWN, EnterStart); | |
myText = new TextField(); | |
myText.text = "Republic of Code"; | |
addChild(myText); |
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
<target name="build.ane" description="Making ane file"> | |
<exec executable="${FLEX_HOME}/bin/adt.bat" failonerror="true"> | |
<arg value="-package"/> | |
<arg value="-target"/> | |
<arg value="ane"/> | |
<arg value="ane_ready_for_use/com.illuzor.extensions.NotificationExtension.ane"/> | |
<arg value="temp/ane/extension.xml"/> | |
<arg line="-swc"/> | |
<arg line="temp/ane/notifExtLib.swc"/> | |
<arg line="-platform Android-ARM -C temp/ane/android/ ."/> |
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
<target name="copy.files" description="Files operations"> | |
<unzip src="temp/libs/notifExtLib.swc" dest="temp/libs/"/> | |
<copy file="extension.xml" tofile="temp/ane/extension.xml"/> | |
<copy file="temp/libs/library.swf" tofile="temp/ane/android/library.swf"/> | |
<move file="temp/libs/library.swf" tofile="temp/ane/default/library.swf"/> | |
<move file="temp/libs/notifExtLib.swc" tofile="temp/ane/notifExtLib.swc"/> | |
</target> |
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
<target name="compile.swc" description="Making swc lib"> | |
<compc | |
failonerror="true" | |
use-network="false" | |
debug="false" | |
swf-version="22" | |
output="temp/libs/notifExtLib.swc"> | |
<load-config filename="${FLEX_HOME}/frameworks/air-config.xml" /> | |
<include-sources dir="${as.classes}"> | |
<include name="**/*.as*" /> |
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
<target name="compile.jar" description="Making jar lib"> | |
<javac | |
failonerror="true" | |
destdir="temp/java_classes" | |
classpath="${fre.lib}:${android.lib}" | |
source="1.6" target="1.6" | |
includeantruntime="false" | |
bootclasspath="${java_rt.lib}"> | |
<src path="${java.classes}"/> | |
</javac> |
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
<target name="make.dirs" description="Making temp folders"> | |
<delete dir="ane_ready_for_use"/> | |
<mkdir dir="ane_ready_for_use"/> | |
<mkdir dir="temp"/> | |
<mkdir dir="temp/java_classes/"/> | |
<mkdir dir="temp/libs/"/> | |
<mkdir dir="temp/ane/"/> | |
<mkdir dir="temp/ane/android/"/> | |
<mkdir dir="temp/ane/default/"/> | |
</target> |
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
<property name="FLEX_HOME" value="C:/Program Files (x86)/FlexSDK/4.11.0/"/> | |
<!-- Write your Flex SDK path--> | |
<property name="android.lib" value="C:/Program Files (x86)/Android SDK/sdk/platforms/android-18/android.jar" /> | |
<!-- Write your android.jar path--> | |
<property name="java_rt.lib" value="C:/Program Files (x86)/Java/jdk1.6.0_45/jre/lib/rt.jar" /> | |
<!-- Write your JDK 1.6 rt.jar path--> | |
<property name="fre.lib" value="${FLEX_HOME}/lib/android/FlashRuntimeExtensions.jar" /> | |
<property name="java.classes" value="source_java/src/" /> | |
<property name="as.classes" value="source_as3/" /> | |
<property name="extension.id" value="com.illuzor.extensions.NotificationExtension" /> |
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
<script> | |
var flashvars = { | |
}; | |
var params = { | |
menu: "false", | |
scale: "noScale", | |
allowFullscreen: "true", | |
allowScriptAccess: "always", | |
bgcolor: "", | |
wmode: "transparent" |