FABridge教程(Flex+Ajax)
一.通过js访问Flex组件
1.准备工作。先建立Flex工程 :fademo,并放置一个文本框:txtName。做完后代码应该类似于这个样子:
view plaincopy to clipboardprint?
·········10········20········30········40········50········60········70········80········90········100·······110·······120·······130·······140·······150
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="0" minHeight="0" width="400" height="300">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:TextInput x="160" y="96" id="txtName"/>
</s:Application>
<?xml version="1.0" encoding="utf-8"?>
相关文档:
<?xml version="1.0"?>
<!-- Simple example to demonstrate the Alert control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script& ......
了解Flex程序的生命周期
Flex程序从本质上讲,就是使用了(由AS编写的)Flex框架的Flash程序。
但在Flex程序中可以忽略timeline这个概念,所有的内容都集于一帧。
事实上Flex程序中的根,是继承flash.display.MovieClip的mx.managers.SystemManager。
SystemManager有两帧。第一帧是预加载程序,第二帧是主程序。
因此 ......
have been studying parsing JSON from PHP using AJAX to display it in
the client side and jQuery had been a great help to me. Here is a very
simple code in parsing JSON using jQuery that i made.
tablejsondata.php
This file makes the request to a php file and displays the returned data into a tabl ......
XML 作为数据源的实例(TESTED)
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" preinitialize="preInit()" fontSize="12" height="500">
<mx:Script>
  ......
作为一个不入流的flex开发人员总结一下不入流的感悟。
我一定要记住,as中的变量的作用范围只有两种,function和class,所以要想用闭包就需要一个createFunction的东西才行,不要妄想在for循环中用闭包了。看了一下as3的参考,发现它的前世和lua还真像,as3的继承其实还是prototype来做的,就是lua的元表了, ......