-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-organizing the examples and their tests, adding a build and copy s…
…cript and adding combo box without label support, and DateChooser/DateField support
- Loading branch information
Showing
18 changed files
with
635 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
./build.py -t all | ||
cp org/flex_pilot/FlexPilot.swf tests | ||
(cd tests && ./build.py -t all) |
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
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ Copyright 2009, Matthew Eernisse ([email protected]) and Slide, Inc. | |
|
||
package org.flex_pilot { | ||
import com.adobe.serialization.json.JSON; | ||
|
||
import org.flex_pilot.astest.ASTest; | ||
import org.flex_pilot.FPLocator; | ||
import org.flex_pilot.FPController; | ||
|
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,106 @@ | ||
package | ||
{ | ||
|
||
import flash.display.DisplayObject; | ||
import flash.events.MouseEvent; | ||
|
||
import mx.containers.ControlBar; | ||
import mx.containers.Panel; | ||
import mx.containers.VBox; | ||
import mx.controls.Button; | ||
import mx.controls.Label; | ||
import mx.controls.Spacer; | ||
import mx.controls.TextInput; | ||
import mx.managers.PopUpManager; | ||
import mx.styles.StyleManager; | ||
|
||
public class GetDocumentName | ||
{ | ||
private var panel:Panel; | ||
private var parent:DisplayObject; | ||
private var textInput:TextInput; | ||
|
||
|
||
public function GetDocumentName(parent:DisplayObject) : void | ||
{ | ||
var vb:VBox = new VBox(); | ||
vb.percentWidth = 100; | ||
var label:Label = new Label(); | ||
var subHeader:Label = new Label(); | ||
textInput = new TextInput(); | ||
|
||
var cb:ControlBar = new ControlBar(); | ||
cb.percentWidth = 100; | ||
var s:Spacer = new Spacer(); | ||
var b1:Button = new Button(); | ||
var b2:Button = new Button(); | ||
|
||
this.parent = parent; | ||
|
||
s.width = 100; | ||
|
||
textInput.maxChars = 50; | ||
textInput.percentWidth = 100; | ||
textInput.automationName = "modalSaveCancelButton"; | ||
|
||
b1.label = "Save"; | ||
b1.addEventListener(MouseEvent.CLICK, setName); | ||
b1.automationName = "modalSaveSaveButton"; | ||
b1.width = 80; | ||
b2.label = "Cancel"; | ||
b2.automationName = "modalSaveCancelButton"; | ||
b2.addEventListener(MouseEvent.CLICK, closePopUp); | ||
b2.width = 80; | ||
|
||
cb.addChild(s); | ||
cb.addChild(b2); | ||
cb.addChild(b1); | ||
|
||
label.text = "Project Name:"; | ||
label.percentWidth = 100; | ||
|
||
subHeader.text = "Enter your project name, and then click Save."; | ||
subHeader.percentWidth = 100; | ||
|
||
|
||
vb.setStyle("paddingBottom", 5); | ||
vb.setStyle("paddingLeft", 5); | ||
vb.setStyle("paddingRight", 5); | ||
vb.setStyle("paddingTop", 5); | ||
vb.addChild(subHeader); | ||
vb.addChild(label); | ||
vb.addChild(textInput); | ||
|
||
panel = new Panel(); | ||
panel.title = "Save Your Project"; | ||
panel.width = 300; | ||
panel.height = 175; | ||
panel.addChild(vb); | ||
panel.addChild(cb); | ||
panel.automationName = "modalDialogSave"; | ||
} | ||
|
||
private function setName(evt:MouseEvent):void | ||
{ | ||
|
||
PopUpManager.removePopUp(panel); | ||
} | ||
|
||
private function closePopUp(evt:MouseEvent):void | ||
{ | ||
PopUpManager.removePopUp(panel); | ||
} | ||
|
||
public function ShowPopUp(defaultName:String="Untitled Project") : void | ||
{ | ||
var projName:String; | ||
|
||
PopUpManager.addPopUp(panel, parent, true); | ||
PopUpManager.centerPopUp(panel); | ||
this.textInput.text = defaultName; | ||
this.textInput.selectionBeginIndex = 0; | ||
this.textInput.selectionEndIndex = textInput.length; | ||
this.textInput.setFocus(); | ||
} | ||
} | ||
} |
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,44 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | ||
<meta http-equiv="pragma" content="no-cache"> | ||
<title> | ||
</title> | ||
<script type="text/javascript"> | ||
var testApp; | ||
function init() { | ||
var html = ''; | ||
var swfName = 'TestAccordion.swf'; | ||
if (document.all) { | ||
html = '<object type="application/x-shockwave-flash"' + | ||
' width="100%" height="100%" id="testApp">' + | ||
' <param name="movie" value="' + swfName + '">' + | ||
' <param name="quality" value="high">' + | ||
' <param name="bgcolor" value="#ffffff">' + | ||
'</object>'; | ||
} | ||
else { | ||
html = '<embed id="testApp" height="100%" width="100%"' + | ||
' name="testApp" src="' + swfName + '"' + | ||
' type="application/x-shockwave-flash"/>'; | ||
} | ||
document.getElementById('testAppContainer').innerHTML = html; | ||
testApp = document.getElementById('testApp') | ||
} | ||
/*function wmClick(p) { | ||
testApp.wm_click(p); | ||
}*/ | ||
window.onload = init; | ||
</script> | ||
<style type="text/css"> | ||
body { | ||
overflow: hidden; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="testAppContainer" style="width: 760px; | ||
height: 340px; border: 1px solid #ccc;"> | ||
</div> | ||
</body> | ||
</html> |
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
File renamed without changes.
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,44 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | ||
<meta http-equiv="pragma" content="no-cache"> | ||
<title> | ||
</title> | ||
<script type="text/javascript"> | ||
var testApp; | ||
function init() { | ||
var html = ''; | ||
var swfName = 'TestCalendar.swf'; | ||
if (document.all) { | ||
html = '<object type="application/x-shockwave-flash"' + | ||
' width="100%" height="100%" id="testApp">' + | ||
' <param name="movie" value="' + swfName + '">' + | ||
' <param name="quality" value="high">' + | ||
' <param name="bgcolor" value="#ffffff">' + | ||
'</object>'; | ||
} | ||
else { | ||
html = '<embed id="testApp" height="100%" width="100%"' + | ||
' name="testApp" src="' + swfName + '"' + | ||
' type="application/x-shockwave-flash"/>'; | ||
} | ||
document.getElementById('testAppContainer').innerHTML = html; | ||
testApp = document.getElementById('testApp') | ||
} | ||
/*function wmClick(p) { | ||
testApp.wm_click(p); | ||
}*/ | ||
window.onload = init; | ||
</script> | ||
<style type="text/css"> | ||
body { | ||
overflow: hidden; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="testAppContainer" style="width: 760px; | ||
height: 340px; border: 1px solid #ccc;"> | ||
</div> | ||
</body> | ||
</html> |
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,30 @@ | ||
<?xml version="1.0"?> | ||
<!-- controls\date\DateFieldFormat.mxml --> | ||
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="init();"> | ||
<mx:Script> | ||
<![CDATA[ | ||
import org.flex_pilot.FPBootstrap; | ||
private function init():void { | ||
FPBootstrap.flex_pilotLibPath = 'FlexPilot.swf'; | ||
FPBootstrap.init(stage); | ||
} | ||
]]> | ||
</mx:Script> | ||
<mx:HBox> | ||
<mx:ComboBox id="cb1"> | ||
<mx:ArrayCollection> | ||
<mx:String>MM/DD/YY</mx:String> | ||
<mx:String>MM/DD/YYYY</mx:String> | ||
<mx:String>DD/MM/YY</mx:String> | ||
<mx:String>DD/MM/YYYY</mx:String> | ||
<mx:String>DD MM, YYYY</mx:String> | ||
</mx:ArrayCollection> | ||
</mx:ComboBox> | ||
|
||
<mx:DateField id="date2" | ||
editable="true" | ||
width="100" | ||
formatString="{cb1.selectedItem}" | ||
/> | ||
</mx:HBox> | ||
</mx:Application> |
Oops, something went wrong.