Skip to content

Commit

Permalink
added an example for an AIR project
Browse files Browse the repository at this point in the history
  • Loading branch information
SlevinBE committed Nov 12, 2011
1 parent 639cd49 commit 8b88e31
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,4 +3,5 @@
build
*.iml
.orig
publish

Binary file added air-single-project/air-single-project.p12
Binary file not shown.
27 changes: 27 additions & 0 deletions air-single-project/build.gradle
@@ -0,0 +1,27 @@
buildscript {
repositories {
//mavenCentral()
mavenLocal()
}
dependencies {
classpath group: 'org.gradlefx', name: 'gradlefx', version: '0.3.2'
}
}

apply plugin: 'gradlefx'

version = '1.0-SNAPSHOT'
type = 'air'

repositories {
mavenRepo name: 'yoolab-releases', url: "http://projects.yoolab.org/maven/content/repositories/releases"
}

//dependency versions
as3commons_lang_version = '0.3.2'

dependencies {
merged group: 'org.as3commons', name: 'as3commons-lang', version: as3commons_lang_version, ext: 'swc'
}

air.storepass = 'gradlefx'
23 changes: 23 additions & 0 deletions air-single-project/src/main/actionscript/Main.mxml
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="library://ns.adobe.com/flex/spark"
xmlns:controls="mx.controls.*">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import org.as3commons.lang.StringUtils;
private function get alertMessage():String {
return StringUtils.deleteWhitespace("Hello world without spaces");
}
]]>
</fx:Script>

<layout>
<HorizontalLayout />
</layout>

<controls:Image source="@Embed('/assets/alertIcon.jpg')" />
<Button click="Alert.show(alertMessage)" label="Click me"/>

</WindowedApplication>
12 changes: 12 additions & 0 deletions air-single-project/src/main/actionscript/air-single-project.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.6">
<id>org.gradlefx.examples.airsingleproject</id>
<filename>AirSingleProject</filename>
<name>Air Single Project Example</name>
<versionNumber>1.0</versionNumber>
<initialWindow>
<content>build/air-single-project.swf</content>
<width>800</width>
<height>600</height>
</initialWindow>
</application>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b88e31

Please sign in to comment.