| <!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> |