声音和动画的例子
来源:互联网 发布:unity3d 开发web 编辑:程序博客网 时间:2024/06/05 05:48
-(void)playSound:(NSString*)soundAct{
NSString *path = [NSStringstringWithFormat:@"%@%@",
[[NSBundlemainBundle] resourcePath],
soundAct];
NSLog(@"%@\n", path);
SystemSoundID soundID;
NSURL *filePath = [NSURLfileURLWithPath:path isDirectory:NO];
AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID);
AudioServicesPlaySystemSound(soundID);
[filePath release];
}
- (IBAction)jump:(id)sender{
if(RYU.center.y >216){
RYU.animationImages = [NSArrayarrayWithObjects:
[UIImageimageNamed:@"jump1.png"],
[UIImageimageNamed:@"jump2.png"],
[UIImageimageNamed:@"jump2.png"],
[UIImageimageNamed:@"jump1.png"],
nil];
RYU.animationDuration =1.0;
RYU.animationRepeatCount =1;
[RYUstartAnimating];
[UIImageViewbeginAnimations:@"jump"context:RYU];
[UIImageViewsetAnimationDuration:1.0];
RYU.center=CGPointMake(RYU.center.x,RYU.center.y-50);
RYU.center=CGPointMake(RYU.center.x,RYU.center.y+50);
[UIImageViewcommitAnimations];
soundFile = [NSStringstringWithFormat:@"/sound.caf"];
[selfplaySound: soundFile];
}
}
- 声音和动画的例子
- 声音、动画和菜单设计
- 在动画中添加音乐和声音
- CABasicAnimation动画和调用系统声音
- unity声音和动画简单实用示例
- 网页中播放声音的例子
- 怎么才能剪切动画里的声音?
- 传感器的使用,高仿微信摇一摇,动画加声音
- 一个用动画和声音来演示各种排序算法的项目
- android属性动画 —— ValueAnimator和ObjectAnimator的例子
- Unity3D的Generic和Legacy动画例子(C#脚本)
- 经典的OGRE机器人的例子(通过例子总结,包含四元数和动画等用法)
- 经典的OGRE机器人的例子(通过例子总结,包含四元数和动画等用法)
- 微信小程序开发例子-录音和播放声音
- Android4.0.3修改启动动画和开机声音
- Android4.0.3修改启动动画和开机声音[转载]
- Android4.0.3修改启动动画和开机声音
- android4.0.3 修改启动动画和开机声音
- [wp7游戏]会说话系列合集
- 第13周报告1之分段函数的调用及测试用例
- SPFA算法 poj 1364
- 2-8 Android 简单介绍 (一)
- Software Primer
- 声音和动画的例子
- python文件操作(转)
- nyoj 216 A problem is easy
- 转载:注解的力量 -----Spring 2.5 JPA hibernate 使用方法的点滴整理(六): 一些常用的数据库 注解
- QTP Tarun读书笔记 和 QTP测试框架解析
- .Net下的线程同步:Part 3 of N--(Mutex)
- 什么是动态语言(转)
- Self-Regulatory Organization - SRO
- Wap开发FAQ大全