PDA

View Full Version : Type not found


idkas3
04-05-2010, 02:33 AM
I am learning action script 3.0 and I am stuck at this for like over 30 minutes can't figure out might be for some stupid reason or something complicated...

created a public variable public var _tires:Tires; and when I compile it says "1046: Type was not found or was not a compile-time constant: Tires."


import flash.display.MovieClip;
import flash.events.Event;

public class Vehicle extends MovieClip {
public var _gasMilage:Number;
public var _fuelAvailable:Number;
public var _milesTraveled:Number = 0;
public var _tires:Tires;
public var _go:Boolean;
........
....
..

nanook
04-05-2010, 05:19 AM
Each class defines a data type. You're trying to create a var of type "Tires". There is no base class in AS3 called "Tires". You have to create it yourself.

idkas3
04-05-2010, 08:16 PM
yeah you are right, i thought that i created already on other external .as file on a single line, but that was for something else.. I have to create a class Tires.as

Thank you much