Simple pet (ActionScript tutorial)
| ActionScript Tutorial |
|---|
| Create a smiple pet using AS3. |
| Difficulty Level |
| Beginner |
| Requirements |
| Other Information |
| Next tutorial: Advanced pet (ActionScript tutorial) |
This tutorial uses AS3 to build an pet for Whirled.
Prerequisites
Set Up Your New Pet
To create a new pet, change to the whirled directory and run the ant newpet task:
% cd whirled % ant newpet
Windows users can double click the newproject.bat file instead of using the command line.
If this is the first time you are using the SDK, it will ask you to configure the directory of your Flex SDK and your Flash Standalone Player. A dialog box will pop up allowing you to specify that information and then you will proceed to creating your new project.
<actionscript> XXX$ ant newpet Buildfile: build.xml
prepare-flex:
[copy] Copying 1 file to /WhirledSDKs/0.34/whirled/etc
[copy] Copying 1 file to /WhirledSDKs/0.34/whirled/etc
newpet: [newproject] Please enter the name of your Pet project. [newproject] For example, BestPetEver: EasyImagePet [newproject] Your main class will be called: [newproject] EasyImagePet.as [newproject] Is this OK? [y/n] y
</actionscript>
and the tool will do the rest for you: <actionscript>[newproject] Creating 'easyimagepet/build.xml'. [newproject] Creating 'easyimagepet/build.bat'. [newproject] Creating 'easyimagepet/EasyImagePet.as'. [newproject] Done! Your new project has been created in 'easyimagepet'. </actionscript>
This article is a stub. You can help the wiki by expanding it.