• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
一蓑烟雨
C/C++,Linux,语音技术
博客园    首页    新随笔    联系   管理    订阅  订阅
sencha touch 2--audio

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运行效果



posted on 2011-12-02 12:00  lovemu  阅读(1052)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3