1、下载、安装 Aptana Studio 3.0.3;
2、创建新的工程HelloTouch;
3、把sencha touch2中的文件拖到新的工程目录下;
要用到的文档包括:css-debug、touch/example、sencha-touch-all-debug.js。
4、创建.html和.js
index.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <!--import touch css and js -->
7 <link rel="stylesheet" href="css-debug/sencha-touch.css" type="text/css" />
8 <script type="text/javascript" src="sencha-touch-all-debug.js"></script>
9 <script type="text/javascript" src="audio.js"></script>
10 <title>New Web Project</title>
11 </head>
12 <body>
13 <!-- <h1>New Web Project</h1> -->
14 </body>
15 </html>
audio.js
1 /**
2 * @author huanghuang
3 */
4 Ext.application({
5 launch:function(){
6 Ext.create("Ext.Container",{
7 fullscreen:true,
8 layout:{
9 type:'vbox',
10 pack:'centered',
11 align:'stretch'
12 },
13 items:[
14 {
15 xtype:'toolbar',
16 docked:'top',
17 title:'Ext.Audio'
18 },
19 {
20 xtype:'audio',
21 // docked:'top',
22 url:'touch/examples/audio/crash.mp3'
23 }
24 ]
25 });
26 }
27 });
5、在chrome运行效果