flex fream 笔记

1. Determine which framework you’d like to
use and download it.
To make that decision, start by looking
at the framework’s features: Does it do
what you need it to do in your program?
As part of this question, make sure the
framework functions perfectly in Apple’s
Safari Web browser. Because Safari uses
the same HTML and JavaScript rendering
engine as Adobe AIR, if the framework
is good for Safari, it’s good for your AIR
application.
A second but still important consideration
is the quantity and quality of
documentation available for the framework
(including tutorials or articles put
together by third parties). The point of a
framework is to save you time; spending
hours figuring out how to use a framework
defeats that purpose.
For these next steps, let’s use the Yahoo!
User Interface (YUI) Library, which was
at version 2.4.1 at the time of this writing.
2. Begin a new AIR project in your text editor
or IDE.
3. Copy any required files to your project’s
directory.
This may be the hardest step because
it requires a thorough understanding
of how the framework will be used. For
example, to use the YUI calendar widget
(Figure 4.4), you need to copy three
files from the downloaded code into the
project folder (all are within the build
directory found in the YUI download):
s yahoo-dom-event/yahoo-dom-event.js
s calendar/calendar-min.js
s calendar/assets/skins/sam/
calendar.css<html><!-- Script 4.1 -->
<head>
<script type=”text/javascript”
 src=”js/AIRAliases.js”>
 </script>
<link rel=”stylesheet”
 type=”text/css” href=”css/
 calendar.css”>
<script type=”text/javascript”
 src=”js/yahoo-dom-event.js”>
 </script>
<script type=”text/javascript”
 src=”js/calendar-min.js”>
 </script>
</head>
<html><!-- Script 4.1 -->
2 <head>
3 <script type=”text/javascript” src=”js/AIRAliases.js”></script>
4 <link rel=”stylesheet” type=”text/css” href=”css/calendar.css”>
5 <script type=”text/javascript” src=”js/yahoo-dom-event.js”></script>
6 <script type=”text/javascript” src=”js/calendar-min.js”></script>
7 </head>
8 <body class=”yui-skin-sam”>
9 <div id=”calendarDIV”></div>
10 <script type=”text/javascript”>
11 var c = new YAHOO.widget.Calendar(“calendarDIV”);
12 c.render();
13 </script>
14 </body>
15 </html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值