CodeCanyon AS3 Talking Avatar library for Android iOS and de 6877949

CodeCanyon AS3 Talking Avatar library for Android iOS and de 6877949

CodeCanyon AS3 Talking Avatar library for Android iOS and de 6877949
Application
Male \ Syncing \ Module \ Avatar \ Vector \ Talking \ Ipad \ Android \ Character



Application - AS3 Talking Avatar library for Android iOS and de 6877949 by tahadaf @ CodeCanyon

Application

Last Update: 19 February 14; Files Included: HTML, JavaScript JSON, .apk; Mobile OS: IOS 4.2, IOS 5.0, IOS 5.1, IOS 6.0, IOS 6.1.x, IOS 7.0.x, Android OS 2.3.3, Android OS 4.0, Android OS 4.2.x, Android OS 4.4.x.

Files Included.

- .as3proj (FlashDevelop AIR sample project)

- .as (source codes)

- Five sample vector avatars

- asDoc type Documentation

Browser based sample
Sample Android App

with using this little but cool library, you will be able to initialize a talking avatar in your Air mobile projects. You will be able to choose from current available avatars in your “bin” folder and insert your own voice .mp3 file and then addChild the Avatar class anywhere in your project and you’re done.

import com.doitflash.utils.avatar.Avatar;
import com.doitflash.utils.avatar.AvatarEvent;
// set Class variable
var _avatar:Avatar;
// initialize a _holder. avatar will be addchilded in _holder.
// _holder must have a specific width and height so we create a new Shape() in the _holder
var _holder:Sprite = new Sprite();
var rect:Shape = new Shape();
rect.graphics.beginFill(0xf64a5f, 1);
rect.graphics.drawRect(0, 0, 400, 600);
_holder.addChild(rect);
_holder.x = 100;
_holder.y = 100;
this.addChild(_holder);
// initialize the Avatar
_avatar = new Avatar();
// add a listener to be notified when the avatar is loaded
_avatar.addEventListener(AvatarEvent.LOADED_AVATAR, onLoadedAvatar);
// add a listener to be notified when the mp3 file is loaded
_avatar.addEventListener(AvatarEvent.LOADED_VOICE, onLoadedVoice);
_avatar.holder = _holder;
_avatar.avatarUrl = "WomanAvatar.swf"; // set the address to the avatar graphic you'd like to use
_avatar.voiceUrl = "test.MP3"; // set the address to the mp3 file which you like to use for lip-syncing
// call this method and load the avatar graphic begins
_avatar.loadAvatar();
private function onLoadedAvatar(e:AvatarEvent):void
{
// call this method and load the mp3 file begins
_avatar.loadVoice();
}
private function onLoadedVoice(e:AvatarEvent):void
{
trace("sound length: ", e.param); // mp3 length is based on miliseconds
// use this listener to be notified when the mp3 playback is finished.
_avatar.addEventListener(AvatarEvent.SOUND_PLAY_FINISHED, onPlayComplete);
// call this method and the mp3 file starts playing
_avatar.play();
}
private function onPlayComplete(e:AvatarEvent):void
{
trace("onPlayComplete");
}
// call this method to pause the mp3 file while playing and it returns the millisecond position of the sound.
// you can use this position to play the mp3 again and start from where it was paused.
// var position:Number = _avatar.pause();
// _avatar.play(position);
//
// call this method to stop the sound.
// _avatar.stop();
// When you're done with this class, call this method to clean up the memory.
// _avatar.dispose();

Pro Moon Light Bootstrap Skin; AS3 multilist pager scroller, android and iOS; AS3 Circle Menu for Air, android and iOS; Android Circle Menu Library; Android Notification Templates Library; Email Newsletter System - Wordpress Plugin; Abstract Login System with API.

Keywords: adobe air, air, android, as3, character, female, ios, ipad, iphone, lip syncing, male, module, talking avatar, vector.



Tags: Android, Avatar, Talking, Iphone, Vector, Module

Premium CodeCanyon AS3 Talking Avatar library for Android iOS and de 6877949 WordPress Themes, Website Templates, Mobile Themes, Flash Templates & Scripts from creative professional designers. Full details of CodeCanyon AS3 Talking Avatar library for Android iOS and de 6877949 for digital design and education. CodeCanyon AS3 Talking Avatar library for Android iOS and de 6877949 desigen style information or anything related.

Comments:

Name:*
E-Mail:*
Add Comments:
Enter Code: *