Simple pet (ActionScript tutorial): Difference between revisions

From Whirled Club Wiki
Jump to navigation Jump to search
(Created page with "{{Infobox tutorial |type=ActionScript |difficulty=Beginner |description=Create a smiple pet using AS3. |requirements=20px ActionScript 3.0,...")
 
m (Text replacement - "<" to "<")
Line 23: Line 23:
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.
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.


&lt;actionscript&gt;
<actionscript&gt;
XXX$ ant newpet
XXX$ ant newpet
Buildfile: build.xml
Buildfile: build.xml
Line 41: Line 41:




&lt;/actionscript&gt;
</actionscript&gt;


and the tool will do the rest for you:
and the tool will do the rest for you:
&lt;actionscript&gt;[newproject]  Creating 'easyimagepet/build.xml'.
<actionscript&gt;[newproject]  Creating 'easyimagepet/build.xml'.
[newproject]  Creating 'easyimagepet/build.bat'.
[newproject]  Creating 'easyimagepet/build.bat'.
[newproject]  Creating 'easyimagepet/EasyImagePet.as'.
[newproject]  Creating 'easyimagepet/EasyImagePet.as'.
[newproject] Done! Your new project has been created in 'easyimagepet'.
[newproject] Done! Your new project has been created in 'easyimagepet'.
&lt;/actionscript&gt;
</actionscript&gt;


{{stub}}
{{stub}}

Revision as of 16:55, 31 August 2018

ActionScript Tutorial
Create a smiple pet using AS3.
Difficulty Level
Beginner
Requirements
Icon-Programming.png ActionScript 3.0, Whirled SDK
Other Information
Next tutorial: Advanced pet (ActionScript tutorial)
Icon-highlighted-pet.png

This tutorial uses AS3 to build an pet for Whirled.


Prerequisites

  1. Setting up your programming environment

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>


Stub.gifThis article is a stub. You can help the wiki by expanding it.