AS3 Talking Avatar Library for Starling Review
The AS3 Talking Avatar Library for Starling is a unique and fascinating asset that allows developers to add talking avatars to their Starling-based mobile applications and desktop projects. With this library, users can choose from a selection of pre-designed avatars, add their own voice audio files, and easily integrate them into their projects.
Supported Devices:
The library supports a wide range of devices, including Android and iOS devices that run Air apps, as well as Starling desktop applications.
Files Included:
.as3proj
(FlashDevelop AIR sample project).as
(source codes)- Five sample vector avatars
- asDoc type Documentation
Ease of Use:
The library is relatively easy to use, especially for developers familiar with Starling. The documentation is comprehensive, and the examples provided in the sample project make it straightforward to integrate the library into your own projects. With a few lines of code, you can add a talking avatar to your application.
Features:
- Ability to choose from pre-designed avatars
- Support for custom voice audio files (.mp3)
- Easy integration into Starling-based projects
- Works on Android and iOS devices
- Desktop support for Starling applications
- Documentation and sample project included
Additional Information:
The library uses the DMT library for dynamically generating textures, which allows for more flexibility and customization. However, the library does not provide a visual interface for creating avatars, so users will need to create their own graphics or use the provided examples.
Score: 8.5/10
The AS3 Talking Avatar Library for Starling is an innovative and useful asset that can greatly enhance the user experience in mobile and desktop applications. While it may require some programming expertise to use effectively, the library provides excellent documentation and examples to help developers get started. The only drawback is the limited visual interface for creating avatars, which may require additional work on the developer’s part.
Recommendation:
I highly recommend this library to developers who are looking to add a unique and engaging feature to their Starling-based projects. While it may not be suitable for all types of applications, the library’s flexibility and customizability make it an excellent choice for many use cases.
User Reviews
Be the first to review “AS3 Talking Avatar library for Starling”
Introduction to the AS3 Talking Avatar Library for Starling
The AS3 Talking Avatar library is a powerful tool that allows developers to add talking avatars to their Flash applications using the Starling framework. This library provides a simple and easy-to-use interface for animating and lip-syncing avatars, making it perfect for interactive storytelling, educational content, and marketing materials.
In this tutorial, we'll explore how to use the AS3 Talking Avatar library to create a talking avatar that can be used in a Starling-based application. We'll cover the installation process, setting up the avatar, creating and animating lip-sync animations, and integrating the avatar with a Starling-based application.
Prerequisites
- AS3 programming knowledge
- Starling framework installed
- A code editor or IDE (such as Adobe Flash Builder or IntelliJ IDEA)
- A project setup with Starling (see Starling's official documentation for more information)
Step 1: Installation
To use the AS3 Talking Avatar library, you'll need to download and install the necessary files. You can download the latest version of the library from the official GitHub repository:
Extract the zip file and copy the talkingavatar
folder to a directory within your project.
Step 2: Setting up the Avatar
The Talking Avatar library comes with several pre-made avatars that you can use. Let's use the "Miku" avatar for this tutorial.
Open the talkingavatar
folder and find the Miku
folder. Inside the Miku
folder, you'll find the avatar's texture files (png), animation files (xml), and the avatar's class file (MikuAvatar.as
).
Create a new directory within your project and name it avatars
. Copy the entire Miku
folder into this directory.
In your project's main file, add the following code to import the MikuAvatar
class:
import talkingavatar.avatars.MikuAvatar;
Step 3: Creating and Animating Lip-Sync Animations
The Talking Avatar library uses a simple scripting language to define lip-sync animations. Create a new file called lipsync.xml
in the avatars
directory and add the following code:
<?xml version="1.0" encoding="utf-8"?>
<animations>
<animation id="hello_world">
<frames>
<frame time="0">
<shape>
<path>
<moveTo x="50" y="50" />
<curveTo x="100" y="100" radius="50" />
</path>
</shape>
</frame>
<frame time="1">
<shape>
<path>
<moveTo x="50" y="100" />
<curveTo x="100" y="150" radius="50" />
</path>
</shape>
</frame>
</frames>
</animation>
</animations>
This script defines a simple animation that moves the avatar's lips and mouth to form the words "Hello, World!".
Step 4: Integrating the Avatar with Starling
Create a new class that extends the Starling
class and add the following code:
package
{
import starling.display.Stage;
import starling.core.starling_internal;
import talkingavatar.avatars.MikuAvatar;
public class TalkingAvatarExample extends Stage
{
private var _mikuAvatar:MikuAvatar;
public function TalkingAvatarExample()
{
super();
// Create the avatar
_mikuAvatar = new MikuAvatar();
_mikuAvatar.x = 100;
_mikuAvatar.y = 100;
// Add the avatar to the stage
addChild(_mikuAvatar);
// Load the lip-sync animation
_mikuAvatar.loadLipsync("lipsync.xml");
// Play the animation
_mikuAvatar.play("hello_world");
}
}
}
This class creates an instance of the MikuAvatar
class, adds it to the stage, loads the lip-sync animation, and plays the animation.
Step 5: Running the Application
Create a new AS3 project in your code editor or IDE and add the TalkingAvatarExample
class to the project. Run the application to see the talking avatar in action!
This tutorial has covered the basics of using the AS3 Talking Avatar library with Starling. You can customize the avatar's appearance and animation using the library's API and experiment with different lip-sync scripts to create unique and engaging animations.
That's it! With this library and this tutorial, you're ready to bring talking avatars to your Starling-based applications.
Here is a complete settings example for the AS3 Talking Avatar library for Starling:
Language
// Set the language for the avatar's speech
avatarSettings.language = "en-US";
Voice
// Set the voice for the avatar's speech
avatarSettings.voice = "femalesmall";
Audio
// Set the audio format for the avatar's speech
avatarSettings.audioFormat = "mp3";
Avatar Appearance
// Set the avatar's skin color
avatarSettings.skinColor = 0xFF0000;
// Set the avatar's hair color
avatarSettings.hairColor = 0x00FF00;
// Set the avatar's eye color
avatarSettings.eyeColor = 0x0000FF;
Facial Expressions
// Set the avatar's default facial expression
avatarSettings.defaultFacialExpression = "smile";
// Set the avatar's maximum facial expression range
avatarSettings.maxFacialExpressionRange = 1.0;
Speech Speed
// Set the avatar's speech speed
avatarSettings.speechSpeed = 1.0;
Volume
// Set the avatar's speech volume
avatarSettings.volume = 0.5;
Background
// Set the background color for the avatar's speech bubble
avatarSettings.backgroundRGB = 0xFFFFFF;
Note: You can adjust these settings as per your requirements to customize the appearance and behavior of the talking avatar.
Here is a summarized version of the AS3 Talking Avatar library for Starling, highlighting the key features:
Supported Devices
- Compatible with Android and iOS devices that support Air apps
- Also compatible with Starling desktop apps
Files Included
.as3proj
(FlashDevelop AIR sample project).as
(source codes)- Five sample vector avatars
- asDoc type Documentation
Key Features
- Initialize a talking avatar in Starling Air mobile projects
- Choose from available avatars in the "bin" folder and insert own voice
.mp3
file - Add the Avatar class anywhere in your project and it's ready to use
Initialization Code
- Set class variables and create a holder for the avatar
- Initialize the StarlingAvatar class and set its holder and avatar URL
- Add listeners for when the avatar and voice are loaded
Methods
loadAvatar()
starts loading the avatar graphicloadVoice()
starts loading the mp3 fileplay()
starts playing the mp3 filepause()
pauses the mp3 file and returns the millisecond position of the soundstop()
stops the mp3 filedispose()
cleans up the memory when done using the class
Other
- The library uses the DMT library for dynamically generating textures in Starling.
Additionally, there is also a non-Starling version of the library available for Android, iOS, and desktop apps.
There are no reviews yet.