Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 Viewsi was following a tutorial on how to make a game and im stuck at a part it told me to create a new as file called Engine in your com/asgamer/basics1 folder. Add this code inside the as file could someone explain it to me
You want us to explain tutorial instructions to you? Tutorials purpose is to teach you. If you don't understand the tutorial, then:
A) Find a new tutorial that explains it better.
B) Admit to yourself that you are too stupid to learn this and find something else to do.
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
At 2/6/11 08:07 PM, cristian123 wrote: i was following a tutorial on how to make a game and im stuck at a part it told me to create a new as file called Engine in your com/asgamer/basics1 folder. Add this code inside the as file could someone explain it to me
To get your document class up and running -
To create a .as file just create a new .txt file or something and change the .txt to .as! or do it through flash - File > New > ActionScript File
name it whatever you want.. or Engine, Now in your .fla go to the properties panel, and look for 'Document Class:' - see the image ( I called mine Main) And input the same name you named your .as file. If you want to stick it in the same folder as that tutorial has told you, you will have to adjust what you write in the Document class box within flash to: 'com/asgamer/basics1/Engine'
If you want to leave it in the same folder as the .fla, then it will just be Engine.
I think you'll have to write some stuff in the document class before it compiles, so to check if it works first, here's a nice empty document class that does absolutely nothing!
package
{
import flash.display.MovieClip;
public class Engine extends MovieClip
{
public function Engine():void
{
}
}
}
if you put this file into that folder, you'll have to add the folder path after the package so it'd be
package com.asgamer.basics1