LIVE PREVIEWBUY FOR $18

Supported gadgets:

on any Android or iOS gadgets that helps Air apps  :)

Information Included:

  • .as3proj (FlashDevelop AIR pattern challenge)
  • .as (supply codes)
  • 5 pattern vector avatars
  • asDoc kind Documentation

Browser based sample

Sample Android App

with utilizing this little however cool library, it is possible for you to to initialize a speaking avatar in your Air cellular initiatives. It is possible for you to to select from present obtainable avatars in your “bin” folder and insert your personal voice .mp3 file after which addChild the Avatar class wherever in your challenge and also you’re achieved.

     import com.doitflash.utils.avatar.Avatar;
     import com.doitflash.utils.avatar.AvatarEvent;

     // set Class variable
     var _avatar:Avatar;

     // initialize a _holder. avatar will likely be addchilded in _holder.
     // _holder will need to have a particular width and top so we create a brand new Form() within the _holder
     var _holder:Sprite = new Sprite();
     var rect:Form = new Form();
     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 handle to the avatar graphic you want to make use of
     _avatar.voiceUrl = "check.MP3"; // set the handle to the mp3 file which you want to make use of for lip-syncing

     // name this methodology and cargo the avatar graphic begins
     _avatar.loadAvatar();

     personal perform onLoadedAvatar(e:AvatarEvent):void
     {
             // name this methodology and cargo the mp3 file begins
             _avatar.loadVoice();
     }

     personal perform onLoadedVoice(e:AvatarEvent):void
     {
             hint("sound size: ", e.param); // mp3 size is predicated on miliseconds

             // use this listener to be notified when the mp3 playback is completed.
             _avatar.addEventListener(AvatarEvent.SOUND_PLAY_FINISHED, onPlayComplete);

             // name this methodology and the mp3 file begins enjoying
             _avatar.play();
     }

     personal perform onPlayComplete(e:AvatarEvent):void
     {
             hint("onPlayComplete");
     }

     // name this methodology to pause the mp3 file whereas enjoying and it returns the millisecond place of the sound.
     // you should use this place to play the mp3 once more and begin from the place it was paused.
     // var place:Quantity = _avatar.pause();
     // _avatar.play(place);
     //
     // name this methodology to cease the sound.
     // _avatar.cease();

     // If you're achieved with this class, name this methodology to wash up the reminiscence.
     // _avatar.dispose();


Source