Skip to content

Instantly share code, notes, and snippets.

<target name="-compile.for.ios" description="Compiling swf for ios">
<java jar="${asc2.compiler}" failonerror="true" fork="true">
<arg value="-load-config+=${air.config}"/>
<arg value="-load-config+=${compile.config}"/>
<arg value="-debug=${debug.build}"/>
<arg value="+configname=airmobile"/>
<arg value="-swf-version=29"/>
<arg value="-define=CONFIG::flashplayer,false"/>
<arg value="-define=CONFIG::android,false"/>
<arg value="-define=CONFIG::ios,true"/>
-define+=CONFIG::flashplayer,true
-define+=CONFIG::android,false
-define+=CONFIG::ios,false
@illuzor
illuzor / l.xml
Created September 22, 2015 13:52
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator"
@illuzor
illuzor / l2.xml
Created September 22, 2015 13:54
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
public function set watchOut(value:Boolean):void {
_watchOut = value;
if (_watchOut) {
watchOutAnimation.visible = true;
} else {
watchOutAnimation.visible = false;
}
}
package com.illuzor.test{
public class LoadedClass{
public function getTestText():String{
return "testText";
}
public function getTestNumber():Number {
return Math.random();
public function Main():void {
var loader:Loader = new Loader();
loader.load(new URLRequest("TestToLoad.swf"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
}
private function onLoaded(e:Event):void {
e.target.removeEventListener(Event.COMPLETE, onLoaded);
var TestClass:Class = e.target.applicationDomain.getDefinition("com.illuzor.test.LoadedClass") as Class;
package com.illuzor.test {
public interface ITest {
function getTestText():String;
function getTestNumber():Number;
function get testGetterVar():String;
}
}
var TestClass:Class = e.target.applicationDomain.getDefinition("com.illuzor.test.LoadedClass") as Class;
var loadedClassInstance:ITest = new TestClass() as ITest;
public function Main():void {
var loader:Loader = new Loader();
loader.load(new URLRequest("TestToLoad.swf"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
}
private function onLoaded(e:Event):void {
e.target.removeEventListener(Event.COMPLETE, onLoaded);
var TestClass:Class = e.target.applicationDomain.getDefinition("com.illuzor.test.LoadedClass") as Class;