flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1351406 [1/3] - in /incubator/flex/trunk/frameworks/javascript: ./ FABridge/ FABridge/samples/ FABridge/samples/srcview/ FABridge/samples/srcview/source/ FABridge/samples/srcview/source/fabridge/ FABridge/samples/srcview/source/fabridge/ac...
Date Mon, 18 Jun 2012 16:26:16 GMT
Author: cframpton
Date: Mon Jun 18 16:26:14 2012
New Revision: 1351406

URL: http://svn.apache.org/viewvc?rev=1351406&view=rev
Log:
Adobe donation: frameworks/javascript.

Added:
    incubator/flex/trunk/frameworks/javascript/
    incubator/flex/trunk/frameworks/javascript/FABridge/
    incubator/flex/trunk/frameworks/javascript/FABridge/readme.txt   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/EmptySwf.as   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.html   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.js   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/SimpleSample.html   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/app.mxml   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceIndex.xml   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceStyles.css   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceTree.swf   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/index.html   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/EmptySwf.as.html   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/app.mxml.html   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/fabridge/
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/fabridge/actionscript/
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/fabridge/actionscript/bridge/
    incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/fabridge/actionscript/bridge/FABridge.as.html   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/src/
    incubator/flex/trunk/frameworks/javascript/FABridge/src/bridge/
    incubator/flex/trunk/frameworks/javascript/FABridge/src/bridge/FABridge.as   (with props)
    incubator/flex/trunk/frameworks/javascript/FABridge/src/bridge/FABridge.js   (with props)
    incubator/flex/trunk/frameworks/javascript/build.xml   (with props)

Added: incubator/flex/trunk/frameworks/javascript/FABridge/readme.txt
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/readme.txt?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/readme.txt (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/readme.txt Mon Jun 18 16:26:14 2012
@@ -0,0 +1,233 @@
+== What Is the Flex AJAX Bridge? ==
+
+The Flex AJAX Bridge (FABridge) is a small, unobtrusive code library that you can insert 
+into an Apache® Flex application, a Flex component, or even an empty SWF file to expose 
+it to scripting in the browser. It is being released to the community under the Apache
+Software Foundation, v2 license.  See http://www.apache.org/licenses/LICENSE-2.0.
+
+To humbly borrow a page from the Ruby on Rails community, FABridge is built with the 
+"don't repeat yourself" principle in mind. Rather than having to define new, simplified 
+APIs to expose a graph of ActionScript objects to JavaScript, with FABridge you can make 
+your ActionScript classes available to JavaScript without any additional coding. After you
+insert the library, essentially anything you can do with ActionScript, you can do with 
+JavaScript.
+
+Adobe® Flash® Player has the native ability, through the External API (the 
+ExternalInterface class), to call JavaScript from ActionScript, and vice versa. But 
+ExternalInterface has some limitations:
+* The ExternalInterface class requires you, the developer, to write a library of extra 
+code in both ActionScript and JavaScript, to expose the functionality of your Flex 
+application to JavaScript, and vice versa.  
+* The ExternalInterface class also limits what you can pass across the gap. Primitive 
+types, arrays, and simple objects are legal, but user-defined classes, with associated 
+properties and methods, are off-limits. 
+* The ExternalInterface class enables you to define an interface so your JavaScript can 
+call your ActionScript. FABridge essentially lets you write JavaScript instead of 
+ActionScript.
+
+== When Should I Use the Flex AJAX Bridge? ==
+
+The FABridge library is useful in the following situations:
+* You want to use a rich Flex component in an AJAX application but do not want to write a 
+lot of Flex code. If you wrap the component in a FABridge-enabled stub application, you 
+can script it entirely from JavaScript, including using eval()’d JavaScript generated 
+remotely by the server.
+* You have only one or two people on your team who know Flex.  Although I would strongly 
+encourage everyone to grab a copy of Flex and try it out (you will love it, I promise!), 
+the FABridge library lets everyone on your team use the work produced by one or two Flex 
+specialists.
+* You are building an integrated rich Internet application (RIA) with both Flex and AJAX 
+portions.  While you could build the integration yourself using ExternalInterface, you 
+might find it faster to start with the FABridge as a head start.
+
+== What Do I Need to Use It? ==
+
+To use the FABridge library and samples, you must have the following:
+* AJAX Bridge, which is included in the following directory of the LiveCycle Data 
+Services installation:
+
+installation_dir\resources\FABridge
+
+* Flex 2 SDK included in the LiveCycle Data Services installation
+* Flash Player 9
+* Microsoft Internet Explorer, Mozilla Firefox, or Opera with JavaScript enabled
+* Any HTTP server to run the samples
+
+== Download and Installation ==
+
+To run the sample files, follow these steps:
+
+1. Copy the src and samples directories from the install_dir\resources\FABridge directory 
+of the LiveCycle Data Services installation side by side on any HTTP server.
+2. Open a web browser to <your web server>/samples/FABridgeSample.html and 
+samples/SimpleSample.html and follow the instructions there.
+
+Make sure you access the samples through http:// URLs and not file:// URLs. The Flash 
+Player security sandbox may prevent them from working correctly if accessed as local files.
+
+== How Do I Use the Flex AJAX Bridge? ==
+
+To use the FABridge library in your own Flex and AJAX applications, follow these steps:
+* Add the src folder to the ActionScript <code>classpath</code> of your Flex application.
+* If you are compiling from the command line, you can add the src folder to your 
+application by specifying it using the --actionscript-classpath compiler option.
+* Add the following tag to your application file:
+
+  <mx:Application ...>
+    <fab:FABridge xmlns:fab="bridge.*" />
+    ...
+
+Use the following code to access your application instance from JavaScript:
+
+  function useBridge() 
+  {
+      var flexApp = FABridge.flash.root();
+  }
+
+To get the value of a property, call it like a function; use the same syntax to access 
+objects by id, as the following example shows:
+
+  function getMaxPrice() 
+  {
+      var flexApp = FABridge.flash.root();
+      var appWidth = flexApp.getWidth();
+      var maxPrice = flexApp.getMaxPriceSlider().getValue();
+  }
+
+To set the value of a property from JavaScript, call the function 
+<code>setPropertyName()</code>, as the following example shows:
+
+  function setMaxPrice(newMaxPrice) 
+  {
+      var flexApp = FABridge.flash.root();
+      flexApp.getMaxPriceSlider().setValue(newMaxPrice);
+  }
+
+You can call object methods directly, just as you would from ActionScript, as the 
+following example shows:
+
+  function setMaxPrice(newMaxPrice) 
+  {
+      var flexApp = FABridge.flash.root();
+      flexApp.getShoppingCart().addItem("Antique Figurine", 12.99);
+  }
+
+You can also pass functions, such as event handlers, from JavaScript to ActionScript, as 
+the following example shows:
+
+  function listenToMaxPrice() 
+  {
+      var flexApp = FABridge.flash.root();
+      var maxPriceCallback = function(event)
+      {
+          document.maxPrice = event.getNewValue();
+          document.loadFilteredProducts(document.minPrice, document.maxPrice);
+      }
+      flexApp.getMaxPriceSlider().addEventListener("change", maxPriceCallback);
+  }
+
+To run initialization code on a Flex file, you must wait for it to download and initialize 
+first. Register a callback to be invoked when the movie is initialized, as the following 
+example shows:
+
+ function initMaxPrice(maxPrice)
+  {
+      var initCallback = function()
+      {
+          var flexApp = FABridge.flash.root();
+          flexApp.getMaxPriceSlider().setValue(maxPrice);
+      }
+      FABridge.addInitializationCallback("flash",initCallback);
+  } 
+
+To script multiple Flash applications on the same page, give them unique bridge names 
+through the flashvars mechanism.  Use the bridge name to access them from the bridge, and 
+to register for initialization callbacks, as the following example shows:
+
+  <object ...>
+    <param name='flashvars' value='bridgeName=shoppingPanel'/>
+    <param name='src' value='app.swf'/>
+    <embed ... flashvars='bridgeName=shoppingPanel'/>
+  </object>
+  
+  function initMaxPrice(maxPrice)
+  {
+      var initCallback = function()
+      {
+          var flexApp = FABridge.shoppingPanel.root();
+          flexApp.getMaxPriceSlider().setValue(maxPrice);
+      }
+      FABridge.addInitializationCallback("shoppingPanel",initCallback);
+  }
+
+<b>Automatic memory management</b>
+
+The FABridge provides automatic memory management that uses a reference counting mechanism
+for all objects that are passed across the bridge. Objects created from the JavaScript 
+side are kept in memory unless the memory is manually released. Events and other 
+Actionscript-initiated objects are destroyed as soon as the corresponding JavaScript 
+function that handles them directly completes its execution. You can manually call the 
+<code>addRef()</code> for an object to have it remain available or call the 
+<code>release()</code> method to decrease its reference counter.
+
+If you must break the function call chain by using the <code>setTimeout()</code> function 
+in JavaScript, for example to act on an event later on as the following example shows, you
+must ensure that the event will still exist. Because the FABridge implements a reference 
+counting mechanism to save memory, events thrown from ActionScript exist only for the 
+duration of the dispatch function.
+
+<pre>
+var flexApp = FABridge.flash.root();
+flexApp.getMaxPriceSlider().addEventListener("change", maxPriceCallback );
+function maxPriceCallback(event) {
+    //when the doSomethingLater function is hit, the event is no longer available;
+    //to make it work you would have to call
+    //FABridge.addRef(event);
+    //then, when you're done with it call FABridge.release(event);
+    setTimeout(function() {doSomethingLater(event);},10);
+}
+</pre>  
+
+<b>Manually destroying objects</b>
+
+You can manually destroy a specific object that has been passed across the bridge, 
+regardless of its reference count by invoking the <code>releaseNamedASObject(myObject)</code> 
+method from JavaScript. This invalidates the object over the bridge and any future calls 
+to it or one of its methods will throw an error.
+
+<b>Handling exceptions</b>
+
+Exceptions that take place in the ActionScript of the bridge as a direct consequence of 
+some JavaScript action are now thrown over the bridge into JavaScript. The mechanism 
+works as follows:
+* When an exception is raised in the ActionScript section, it is caught in a try-catch 
+block, serialized, and passed to JavaScript. 
+* When the JavaScript part receives an answer from ActionScript, it checks for the 
+exception serialization and, if found, throws a JavaScript error with the message received
+from ActionScript.
+
+Note: To catch and use the exception information, you must surround the code that calls 
+into ActionScript with a try-catch block. You can handle the error in the <code>catch(e)</code> 
+block.
+
+== What Are the Limitations? ==
+
+The FABridge library is currently in a beta state. It has been tested on Mozilla Firefox 2
+(Windows and Linux), Microsoft Internet Explorer 6, Opera 9, and Apple Safari 2.0.4.
+
+Exceptions thrown across the bridge into JavaScript depend on the user having installed 
+Flash Debug Player to display the entire error description. Otherwise, only the error ID
+is thrown.
+
+For performance reasons, when an anonymous object is sent from ActionScript to JavaScript,
+the bridge assumes it contains only primitives, arrays, and other anonymous objects, and 
+no strongly typed objects or methods. Instances or methods sent as part of an anonymous 
+object are not bridged correctly.
+
+== Summary ==
+
+You can use the FABridge library to automatically expose your Flex application to 
+AJAX-based HTML applications.  Using the bridge, you can easily embed rich Flex components
+in your applications, integrating them tightly with the rest of the page content. After a
+Flex application is enabled through the bridge, JavaScript developers have access to all
+of the functionality it provides.

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/readme.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/readme.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/EmptySwf.as
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/EmptySwf.as?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/EmptySwf.as (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/EmptySwf.as Mon Jun 18 16:26:14 2012
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+	import flash.display.MovieClip;
+	import bridge.FABridge;
+	
+	public class EmptySwf extends MovieClip {
+		
+		private var externalBridge:FABridge;
+		
+		public function EmptySwf() {
+			super();
+			externalBridge = new FABridge();
+			externalBridge.rootObject = this;
+		}
+	}
+}

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/EmptySwf.as
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/EmptySwf.as
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.html
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.html?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.html (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.html Mon Jun 18 16:26:14 2012
@@ -0,0 +1,115 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<head>
+	<title>Flex-AJAX Bridge Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<style type="text/css" media="screen">
+	body {
+		margin: 0px;
+		overflow: hidden;
+		font-size: .9em;
+	}
+	
+	#container {
+		width: 1024px;
+	}
+
+	#controls {
+		margin-bottom: 20px; 
+		float: left; 
+		padding: 20px;
+	}
+
+	#flashcontent {
+		margin-top: 20px; 
+		width: auto;
+	}
+
+	textarea {
+		font-size: 1em;
+	}
+	</style>
+	<script type="text/javascript" src="fabridge/javascript/FABridge.js" ></script>
+	<script type="text/javascript" src="FABridgeSample.js" ></script>
+	<script type="text/javascript" src="fabridge/swfobject/swfobject.js"></script>
+	<script type="text/javascript">
+		var flashvars = {};
+		flashvars.bridgeName = "example";
+		var params = {};
+		var attributes = {};
+		attributes.id = "flexApp";
+		attributes.name = "flexApp";
+		swfobject.embedSWF("app.swf", "flashcontent", "400", "400", "9.0.124", "", flashvars, params, attributes);
+	</script>
+</head>
+<body>
+	<div id="container">
+		<div id="controls">
+			<textarea id="expr" cols="60" rows="20">type in javascript code here.  use the radio buttons below to view sample FABridge code</textarea>
+			<br />
+			<input type="button" onclick="testEval();return false;" value="execute" />
+			<div style="margin-left: 20px">
+				<p>Sample Code:<br />
+					<input id="get_slider" onclick="updateCode('get_slider')" name="code" type="radio" />
+					<label for="get_slider">get slider value</label>
+					
+					<input id="set_check" onclick="updateCode('set_check')" name="code" type="radio" />
+					<label for="set_check">set checkbox value</label>
+					<br />
+					
+					<input id="invoke_as" onclick="updateCode('invoke_as')" name="code" type="radio" />
+					<label for="invoke_as">invoke actionscript function</label>
+					
+					<input id="button_event_handler" onclick="updateCode('button_event_handler')" name="code" type="radio" />
+					<label for="button_event_handler">call javascript from AS button</label>
+					
+					<br />
+					<input id="slider_event_handler" onclick="updateCode('slider_event_handler')" name="code" type="radio" />
+					<label for="slider_event_handler">listen for slider changes</label>
+					
+					<input id="create_datagrid" onclick="updateCode('create_datagrid')" name="code" type="radio" />
+					<label for="create_datagrid">create and populate a datagrid</label>
+				</p>
+				<p>Charts:<br />
+					<input id="make_chart" onclick="updateCode('make_chart')" name="code" type="radio" />
+					<label for="make_chart">create a chart</label>
+					
+					<input id="make_data" onclick="updateCode('make_data')" name="code" type="radio" />
+					<label for="make_data">generate data</label>
+					<br />
+					<input id="make_interpolate" onclick="updateCode('make_interpolate')" name="code" type="radio" />
+					<label for="make_interpolate">interpolate changes</label>
+
+					<input id="make_zoom" onclick="updateCode('make_zoom')" name="code" type="radio" />
+					<label for="make_zoom">zoom changes</label>
+				</p>
+			</div>
+			Trace Output:<br />
+			<textarea id="output" cols="60" rows="10"></textarea><br />
+		</div>
+        <div id="flashcontent">
+            <p>Your browser must have JavaScript enabled and the Adobe Flash Player installed.</p>
+            <a href="http://www.adobe.com/go/getflashplayer">
+                <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
+            </a>
+		</div>
+	</div>
+</body>
+</html>

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.js
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.js?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.js (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.js Mon Jun 18 16:26:14 2012
@@ -0,0 +1,188 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+function $() {
+  var elements = new Array();
+
+  for (var i = 0; i < arguments.length; i++) {
+    var element = arguments[i];
+    if (typeof element == 'string')
+      element = document.getElementById(element);
+
+    if (arguments.length == 1)
+      return element;
+
+    elements.push(element);
+  }
+
+  return elements;
+}
+
+var codes = {
+	'get_slider': 'trace( flexApp.getSlider().getValue() )', 
+	'set_check': '\n\
+var currentCheckValue = flexApp.getCheck().getSelected();\n\
+flexApp.getCheck().setSelected( ! currentCheckValue )\n\
+	', 
+	'invoke_as': 'flexApp.testFunc( "Hello, Actionscript World! Love, Javascript..." );', 
+	'button_event_handler': '\n\
+var callback = function() {\n\
+	alert("Hello, Javascript! Love, Actionscript...");\n\
+}\n\
+flexApp.getButton().addEventListener("click", callback);\n\
+	', 
+	'slider_event_handler': '\n\
+var callback = function(event) {\n\
+	trace(event.getValue());\n\
+}\n\
+flexApp.getSlider().addEventListener("change", callback);\n\
+	', 
+	'create_datagrid': '\n\
+var grid = FABridge.example.create("mx.controls.DataGrid");\n\
+var col1 = FABridge.example.create("mx.controls.dataGridClasses.DataGridColumn");\n\
+col1.setDataField("apples");\n\
+var col2 = FABridge.example.create("mx.controls.dataGridClasses.DataGridColumn");\n\
+col2.setDataField("oranges");\n\
+grid.setColumns( [col1, col2] );\n\
+grid.setWidth(300);\n\
+grid.setDataProvider( [ { apples: 12, oranges: 32 }, { apples: 7, oranges: 47 }, { apples: 14, oranges:21 } ] );\n\
+flexApp.getPanel().addChild(grid);\n\
+grid.addEventListener("change", function(event) { trace("apples: " + event.getTarget().getSelectedItem().apples); } );\n\
+	', 
+	'make_rect': '\n\
+var spr = FABridge.example.create("flash.display.Sprite");\n\
+trace(spr);\n\
+var g = spr.getGraphics();\n\
+g.beginFill(0xFF0000);\n\
+g.lineStyle(2,2);\n\
+g.drawRect(-100,-100,200,200);\n\
+g.endFill();\n\
+flexApp.addChild(spr);\n\
+spr.setX(300);\n\
+spr.setY(300);\n\
+	', 
+	'make_chart': '\n\
+var chart = FABridge.example.create("mx.charts.ColumnChart");\n\
+\n\
+chart.setName("chart");\n\
+\n\
+var s1 = FABridge.example.create("mx.charts.series.ColumnSeries");\n\
+s1.setYField("apples");\n\
+\n\
+var s2 = FABridge.example.create("mx.charts.series.ColumnSeries");\n\
+s2.setYField("oranges");\n\
+\n\
+chart.setSeries( [s1, s2] );\n\
+chart.setWidth(300);\n\
+chart.setHeight(200);\n\
+\n\
+flexApp.getPanel().addChild(chart);\n\
+	', 
+	'make_interpolate': '\n\
+// make sure to \'create a chart\' first\n\
+var chart = flexApp.getPanel().getChildByName("chart");\n\
+var series = chart.getSeries();\n\
+var effect = FABridge.example.create("mx.charts.effects.SeriesInterpolate");\n\
+effect.setMinimumElementDuration(300);\n\
+series[0].setStyle("hideDataEffect", null);\n\
+series[0].setStyle("showDataEffect", effect);\n\
+series[1].setStyle("hideDataEffect", null);\n\
+series[1].setStyle("showDataEffect", effect);\n\
+// now generate new data...\n\
+	', 
+	'make_zoom': '\n\
+// make sure to \'create a chart\' first\n\
+var chart = flexApp.getPanel().getChildByName("chart");\n\
+var series = chart.getSeries();\n\
+var effect = FABridge.example.create("mx.charts.effects.SeriesZoom");\n\
+effect.setMinimumElementDuration(300);\n\
+series[0].setStyle("hideDataEffect",effect);\n\
+series[0].setStyle("showDataEffect",effect);\n\
+series[1].setStyle("hideDataEffect",effect);\n\
+series[1].setStyle("showDataEffect",effect);\n\
+// now generate new data...			\n\
+	', 
+	'make_data': '\n\
+var chart = flexApp.getPanel().getChildByName("chart");\n\
+\n\
+var dp = [];\n\
+for(var i=0; i < 30; i++) {\n\
+	dp.push( {apples: Math.random()*100, oranges: Math.random()*100} );\n\
+}\n\
+chart.setDataProvider(dp);\n\
+	', 
+	'make_spinner': '\n\
+var spr = FABridge.example.create("flash.display.Sprite");\n\
+trace(spr);\n\
+var g = spr.getGraphics();\n\
+g.beginFill(0xFF0000);\n\
+g.lineStyle(2,2);\n\
+g.drawRect(-100,-100,200,200);\n\
+g.endFill();\n\
+flexApp.addChild(spr);\n\
+spr.setX(300);\n\
+spr.setY(300);\n\
+\n\
+var speed = Math.random() * 13;\n\
+flexApp.getStage().addEventListener("enterFrame", function(e) {\n\
+	spr.setRotation(spr.getRotation() + speed);\n\
+});\n\
+	' 
+};
+
+function updateCode(event)
+{
+	var code;
+	
+	if(typeof(event) == "string") {
+		code = event;
+	}
+	else
+	{
+		var elt = getEventTarget(event);
+		code = elt['id'];
+	}
+
+	if (typeof codes[code] != "undefined") {
+		newCode = codes[code];
+	}
+	$("expr").value = "var flexApp = FABridge.example.root();\n\n" + newCode;
+}
+
+function testEval() {
+	var funcExpr = $("expr").value;
+	eval(funcExpr);
+}
+
+function trace(msg) {
+	$("output").value = msg.toString() + "\n" + $("output").value;	
+}
+
+function getEventTarget(e) {
+	if (/Explorer/.test(navigator.appName))
+		return e.srcElement;
+	else
+		return e.target;
+}
+
+function dumpit(e) {
+	var out = "";
+	for (var aProp in e)
+		out += ("obj[" + aProp + "] = " + e[aProp]) + "\n";
+	trace(out);
+}

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/FABridgeSample.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/SimpleSample.html
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/SimpleSample.html?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/SimpleSample.html (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/SimpleSample.html Mon Jun 18 16:26:14 2012
@@ -0,0 +1,90 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<head>
+    <title>Flash Bridge Sample</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <style type="text/css" media="screen">
+    body {
+        margin: 0px;
+        overflow: hidden;
+        font-size: .9em;
+    }
+    
+    #container {
+        width: 1024px;
+    }
+
+    #controls {
+        margin-bottom: 20px; 
+        float: left; 
+        padding: 20px;
+    }
+
+    #flashcontent {
+        margin-top: 20px; 
+        width: auto;
+    }
+
+    textarea {
+        font-size: 1em;
+    }
+    </style>
+    <script type="text/javascript" src="fabridge/javascript/FABridge.js" ></script>
+    <script type="text/javascript" src="FABridgeSample.js" ></script>
+    <script type="text/javascript" src="fabridge/swfobject/swfobject.js"></script>
+    <script type="text/javascript">
+        var flashvars = {};
+        flashvars.bridgeName = "example";
+        var params = {};
+        var attributes = {};
+        attributes.id = "flexApp";
+        attributes.name = "flexApp";
+        swfobject.embedSWF("EmptySwf.swf", "flashcontent", "400", "400", "9.0.124", "", flashvars, params, attributes);
+    </script>
+</head>
+<body>
+    <div id="container">
+        <div id="controls">
+            <textarea id="expr" cols="60" rows="20">type in javascript code here.  use the radio buttons below to view sample FABridge code</textarea>
+            <br />
+            <input type="button" onclick="testEval();return false;" value="execute" />
+            <div style="margin-left: 20px">
+                <p>Sample Code:<br />
+                    <input id="make_rect" onclick="updateCode('make_rect')" name="code" type="radio" />
+                    <label for="make_rect">make rectangle</label>
+                    
+                    <input id="make_spinner" onclick="updateCode('make_spinner')" name="code" type="radio" />
+                    <label for="make_spinner">make spinning rectangle</label>
+                </p>
+            </div>
+            Trace Output:<br />
+            <textarea id="output" cols="60" rows="10"></textarea><br />
+        </div>
+        <div id="flashcontent">
+            <p>Your browser must have JavaScript enabled and the Adobe Flash Player installed.</p>
+            <a href="http://www.adobe.com/go/getflashplayer">
+                <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
+            </a>
+        </div>
+    </div>
+</body>
+</html>
+
+

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/SimpleSample.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/SimpleSample.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/app.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/app.mxml?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/app.mxml (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/app.mxml Mon Jun 18 16:26:14 2012
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" height="400" viewSourceURL="srcview/index.html">
+
+	<mx:Script>
+		<![CDATA[
+			import mx.controls.dataGridClasses.DataGridColumn;
+			import mx.controls.Alert;
+			import mx.controls.*;
+			import mx.charts.*;
+			import mx.charts.series.*;
+			import mx.charts.effects.*;
+
+			public function testFunc(val1:String = "defaultParam" ):void
+            {
+				Alert.show(val1, "called remotely");
+			}
+
+			// these just force datagrid to be linked into the application
+			public var refs:Array = [DataGrid, DataGridColumn, ColumnChart, ColumnSeries, LineSeries, CategoryAxis, SeriesInterpolate, SeriesSlide, SeriesZoom ];
+
+		]]>
+	</mx:Script>
+
+	<mx:Panel width="100%" height="100%" id="panel" paddingLeft="20" paddingTop="20" >
+		<mx:Text width="100%" height="16">
+			<mx:text>
+				Refer to the controls below, via javascript, as slider(), check(), and button() respectively
+			</mx:text>
+		</mx:Text>
+		<mx:CheckBox x="49" y="34" label="Checkbox" id="check"/>
+		<mx:HSlider snapInterval=".01" id="slider" liveDragging="true"/>
+		<mx:Button id="button" label="generic button" />
+	</mx:Panel>
+
+	<fab:FABridge xmlns:fab="bridge.*" />
+
+</mx:Application>

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/app.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/app.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceIndex.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceIndex.xml?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceIndex.xml (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceIndex.xml Mon Jun 18 16:26:14 2012
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<index>
+	<title>Source of fabridge</title>
+	<nodes>
+		<node label="[source path] actionscript" icon="classpathIcon" expanded="true">
+			<node label="bridge" icon="packageIcon" expanded="true">
+				<node label="FABridge.as" icon="actionScriptIcon" url="source/fabridge/actionscript/bridge/FABridge.as.html"/>
+			</node>
+		</node>
+		<node label="fabridge">
+			<node label="javascript">
+				<node label="FABridge.js" url="source/fabridge/javascript/FABridge.js"/>
+			</node>
+		</node>
+		<node selected="true" label="app.mxml" icon="mxmlAppIcon" url="source/app.mxml.html"/>
+		<node label="EmptySwf.as" icon="actionScriptIcon" url="source/EmptySwf.as.html"/>
+		<node label="FABridgeSample.html" icon="htmlIcon" url="source/FABridgeSample.html"/>
+		<node label="FABridgeSample.js" url="source/FABridgeSample.js"/>
+		<node label="SimpleSample.html" icon="htmlIcon" url="source/SimpleSample.html"/>
+	</nodes>
+	<zipfile label="Download source (ZIP, 18K)" url="fabridge.zip"/>
+	<sdklink label="Download Apache Flex 4 SDK" url="http://www.adobe.com/go/apacheflex_download"/>
+</index>

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceIndex.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceIndex.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceStyles.css
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceStyles.css?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceStyles.css (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceStyles.css Mon Jun 18 16:26:14 2012
@@ -0,0 +1,174 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+body {
+	font-family: Courier New, Courier, monospace;
+}
+
+.asBracket {
+}
+
+.asClass {
+	color: #9900cc;
+	font-weight: bold;
+}
+
+.asComment {
+	color: #009900;
+	font-style: italic;
+}
+
+.asDoc {
+	color: #3f5fbf;
+}
+
+.asFunction {
+	color: #339966;
+	font-weight: bold;
+}
+
+.asIdent {
+}
+
+.asInterface {
+	color: #9900cc;
+	font-weight: bold;
+}
+
+.asMetadata {
+	color: #0033ff;
+	font-weight: bold;
+}
+
+.asNumber {
+}
+
+.asOperator {
+}
+
+.asPackage {
+	color: #9900cc;
+	font-weight: bold;
+}
+
+.asReserved {
+	color: #0033ff;
+	font-weight: bold;
+}
+
+.asString {
+	color: #990000;
+	font-weight: bold;
+}
+
+.asTagProp {
+	color: #0000ff;
+}
+
+.asTrace {
+	color: #cc6666;
+	font-weight: bold;
+}
+
+.asType {
+	color: #636563;
+}
+
+.asVar {
+	color: #6699cc;
+	font-weight: bold;
+}
+
+.cssComment {
+	color: #999999;
+}
+
+.cssFontFace {
+	color: #990000;
+	font-weight: bold;
+}
+
+.cssImport {
+	color: #006666;
+	font-weight: bold;
+}
+
+.cssKeyword {
+	color: #ff00ff;
+	font-weight: bold;
+}
+
+.cssMedia {
+	color: #663333;
+	font-weight: bold;
+}
+
+.cssPropName {
+	color: #330099;
+}
+
+.cssPropValue {
+	color: #3333cc;
+}
+
+.cssSelector {
+	color: #ff00ff;
+}
+
+.cssString {
+	color: #006600;
+}
+
+.cssSymbol {
+}
+
+.mxmlCdata {
+}
+
+.mxmlComment {
+	color: #800000;
+}
+
+.mxmlComponent {
+	color: #0000ff;
+}
+
+.mxmlEventAttr {
+	color: #ff6600;
+}
+
+.mxmlNamespace {
+	color: #cc9933;
+}
+
+.mxmlProcInstr {
+	color: #808080;
+}
+
+.mxmlString {
+	color: #990000;
+}
+
+.mxmlTag {
+	color: #006633;
+}
+
+.mxmlTagText {
+	color: #990099;
+}
+

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceStyles.css
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceStyles.css
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceTree.swf
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceTree.swf?rev=1351406&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/SourceTree.swf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/index.html
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/index.html?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/index.html (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/index.html Mon Jun 18 16:26:14 2012
@@ -0,0 +1,32 @@
+<!-- saved from url=(0014)about:internet -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Source of fabridge</title>
+</head>
+<frameset cols="235,*" border="2" framespacing="1">
+    <frame src="SourceTree.html" name="leftFrame" scrolling="NO">
+    <frame src="source/app.mxml.html" name="mainFrame">
+</frameset>
+<noframes>
+	<body>		
+	</body>
+</noframes>
+</html>

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/index.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/EmptySwf.as.html
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/EmptySwf.as.html?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/EmptySwf.as.html (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/EmptySwf.as.html Mon Jun 18 16:26:14 2012
@@ -0,0 +1,43 @@
+<!-- saved from url=(0014)about:internet -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<title>EmptySwf.as</title>
+<link rel="stylesheet" type="text/css" href="../SourceStyles.css"/>
+</head>
+<body><pre><span class="asComment">/*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  
+*/</span>
+
+<span class="asPackage">package</span> <span class="asBracket">{</span>
+    <span class="asReserved">import</span> flash.display.MovieClip;
+    <span class="asReserved">import</span> bridge.FABridge;
+    
+    <span class="asReserved">public</span> <span class="asClass">class</span> EmptySwf <span class="asReserved">extends</span> MovieClip <span class="asBracket">{</span>
+        
+        <span class="asReserved">private</span> <span class="asVar">var</span> externalBridge<span class="asOperator">:</span>FABridge;
+        
+        <span class="asReserved">public</span> <span class="asFunction">function</span> EmptySwf<span class="asBracket">()</span> <span class="asBracket">{</span>
+            <span class="asReserved">super</span><span class="asBracket">()</span>;
+            externalBridge <span class="asOperator">=</span> <span class="asReserved">new</span> FABridge<span class="asBracket">()</span>;
+            externalBridge.rootObject <span class="asOperator">=</span> <span class="asReserved">this</span>;
+        <span class="asBracket">}</span>
+    <span class="asBracket">}</span>
+<span class="asBracket">}</span>
+</pre></body>
+</html>

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/EmptySwf.as.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/EmptySwf.as.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/app.mxml.html
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/app.mxml.html?rev=1351406&view=auto
==============================================================================
--- incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/app.mxml.html (added)
+++ incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/app.mxml.html Mon Jun 18 16:26:14 2012
@@ -0,0 +1,66 @@
+<!-- saved from url=(0014)about:internet -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<title>app.mxml</title>
+<link rel="stylesheet" type="text/css" href="../SourceStyles.css"/>
+</head>
+
+<body><pre><span class="mxmlCdata">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span>
+
+<span class="mxmlComment">&lt;!--</span><span class="mxmlComment">
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the &quot;License&quot;); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+</span><span class="mxmlComment">--&gt;</span>
+
+
+<span class="mxmlComponent">&lt;mx:Application</span> xmlns:mx=&quot;<span class="mxmlString">http://www.adobe.com/2006/mxml</span>&quot; xmlns=&quot;<span class="mxmlString">*</span>&quot; height=&quot;<span class="mxmlString">400</span>&quot; viewSourceURL=&quot;<span class="mxmlString">srcview/index.html</span>&quot;<span class="mxmlComponent">&gt;</span>
+
+    <span class="mxmlTag">&lt;mx:Script&gt;</span>
+        <span class="asOperator">&lt;!</span><span class="asBracket">[</span>CDATA<span class="asBracket">[</span>
+            <span class="asReserved">import</span> mx.controls.dataGridClasses.DataGridColumn;
+            <span class="asReserved">import</span> mx.controls.Alert;
+            <span class="asReserved">import</span> mx.controls.<span class="asOperator">*</span>;
+            <span class="asReserved">import</span> mx.charts.<span class="asOperator">*</span>;
+            <span class="asReserved">import</span> mx.charts.series.<span class="asOperator">*</span>;
+            <span class="asReserved">import</span> mx.charts.effects.<span class="asOperator">*</span>;
+
+            <span class="asReserved">public</span> <span class="asFunction">function</span> testFunc<span class="asBracket">(</span>val1<span class="asOperator">:</span>String <span class="asOperator">=</span> <span class="asString">&quot;defaultParam&quot;</span> <span class="asBracket">)</span><span class="asOperator">:</span><span class="asReserved">void</span>
+            <span class="asBracket">{</span>
+                Alert.show<span class="asBracket">(</span>val1, <span class="asString">&quot;called remotely&quot;</span><span class="asBracket">)</span>;
+            <span class="asBracket">}</span>
+
+            <span class="asComment">// these just force datagrid to be linked into the application
+</span>            <span class="asReserved">public</span> <span class="asVar">var</span> refs<span class="asOperator">:</span>Array <span class="asOperator">=</span> <span class="asBracket">[</span>DataGrid, DataGridColumn, ColumnChart, ColumnSeries, LineSeries, CategoryAxis, SeriesInterpolate, SeriesSlide, SeriesZoom <span class="asBracket">]</span>;
+
+        <span class="asBracket">]]</span><span class="asOperator">&gt;</span>
+    <span class="mxmlTag">&lt;/mx:Script&gt;</span>
+
+    <span class="mxmlComponent">&lt;mx:Panel</span> width=&quot;<span class="mxmlString">100%</span>&quot; height=&quot;<span class="mxmlString">100%</span>&quot; id=&quot;<span class="mxmlString">panel</span>&quot; paddingLeft=&quot;<span class="mxmlString">20</span>&quot; paddingTop=&quot;<span class="mxmlString">20</span>&quot; <span class="mxmlComponent">&gt;</span>
+        <span class="mxmlComponent">&lt;mx:Text</span> width=&quot;<span class="mxmlString">100%</span>&quot; height=&quot;<span class="mxmlString">16</span>&quot;<span class="mxmlComponent">&gt;</span>
+            <span class="mxmlComponent">&lt;mx:text&gt;</span>
+                Refer to the controls below, via javascript, as slider(), check(), and button() respectively
+            <span class="mxmlComponent">&lt;/mx:text&gt;</span>
+        <span class="mxmlComponent">&lt;/mx:Text&gt;</span>
+        <span class="mxmlComponent">&lt;mx:CheckBox</span> x=&quot;<span class="mxmlString">49</span>&quot; y=&quot;<span class="mxmlString">34</span>&quot; label=&quot;<span class="mxmlString">Checkbox</span>&quot; id=&quot;<span class="mxmlString">check</span>&quot;<span class="mxmlComponent">/&gt;</span>
+        <span class="mxmlComponent">&lt;mx:HSlider</span> snapInterval=&quot;<span class="mxmlString">.01</span>&quot; id=&quot;<span class="mxmlString">slider</span>&quot; liveDragging=&quot;<span class="mxmlString">true</span>&quot;<span class="mxmlComponent">/&gt;</span>
+        <span class="mxmlComponent">&lt;mx:Button</span> id=&quot;<span class="mxmlString">button</span>&quot; label=&quot;<span class="mxmlString">generic button</span>&quot; <span class="mxmlComponent">/&gt;</span>
+    <span class="mxmlComponent">&lt;/mx:Panel&gt;</span>
+
+    <span class="mxmlComponent">&lt;fab:FABridge</span> xmlns:fab=&quot;<span class="mxmlString">bridge.*</span>&quot; <span class="mxmlComponent">/&gt;</span>
+
+<span class="mxmlComponent">&lt;/mx:Application&gt;</span></pre></body>
+</html>

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/app.mxml.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/frameworks/javascript/FABridge/samples/srcview/source/app.mxml.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message